Merge pull request #285431 from NickCao/nbd-port

nbd: add patch to fix reading port setting from nbdtab
This commit is contained in:
Nick Cao 2024-02-01 14:05:27 -05:00 committed by GitHub
commit 0620ef3a93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, pkg-config
, glib
, which
@ -20,6 +21,15 @@ stdenv.mkDerivation rec {
hash = "sha256-9cj9D8tXsckmWU0OV/NWQy7ghni+8dQNCI8IMPDL3Qo=";
};
patches = [
# fix port setting from nbdtab
# https://github.com/NetworkBlockDevice/nbd/pull/154
(fetchpatch {
url = "https://github.com/NetworkBlockDevice/nbd/commit/915444bc0b8a931d32dfb755542f4bd1d37f1449.patch";
hash = "sha256-6z+c2cXhY92WPDqRO6AJ5BBf1N38yTgOE1foduIr5Dg=";
})
];
nativeBuildInputs = [
pkg-config
which
@ -38,6 +48,9 @@ stdenv.mkDerivation rec {
"--sysconfdir=/etc"
];
# ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=implicit-function-declaration";
doCheck = !stdenv.isDarwin;
passthru.tests = {