16 stdenv.mkDerivation rec {
21 url = "https://github.com/NetworkBlockDevice/nbd/releases/download/nbd-${version}/nbd-${version}.tar.xz";
22 hash = "sha256-9cj9D8tXsckmWU0OV/NWQy7ghni+8dQNCI8IMPDL3Qo=";
26 # fix port setting from nbdtab
27 # https://github.com/NetworkBlockDevice/nbd/pull/154
29 url = "https://github.com/NetworkBlockDevice/nbd/commit/915444bc0b8a931d32dfb755542f4bd1d37f1449.patch";
30 hash = "sha256-6z+c2cXhY92WPDqRO6AJ5BBf1N38yTgOE1foduIr5Dg=";
45 ++ lib.optionals stdenv.hostPlatform.isLinux [
54 # ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
55 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=implicit-function-declaration";
57 doCheck = !stdenv.hostPlatform.isDarwin;
60 test = nixosTests.nbd;
64 homepage = "https://nbd.sourceforge.io/";
65 description = "Map arbitrary files as block devices over the network";
66 license = lib.licenses.gpl2Only;
67 platforms = lib.platforms.unix;
68 maintainers = with lib.maintainers; [ nickcao ];