depot/third_party/nixpkgs/pkgs/tools/networking/nbd/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

54 lines
947 B
Nix

{ lib
, stdenv
, fetchurl
, pkg-config
, glib
, which
, bison
, nixosTests
, libnl
, linuxHeaders
, gnutls
}:
stdenv.mkDerivation rec {
pname = "nbd";
version = "3.25";
src = fetchurl {
url = "https://github.com/NetworkBlockDevice/nbd/releases/download/nbd-${version}/nbd-${version}.tar.xz";
hash = "sha256-9cj9D8tXsckmWU0OV/NWQy7ghni+8dQNCI8IMPDL3Qo=";
};
nativeBuildInputs = [
pkg-config
which
bison
];
buildInputs = [
glib
gnutls
] ++ lib.optionals stdenv.isLinux [
libnl
linuxHeaders
];
configureFlags = [
"--sysconfdir=/etc"
];
doCheck = !stdenv.isDarwin;
passthru.tests = {
test = nixosTests.nbd;
};
meta = {
homepage = "https://nbd.sourceforge.io/";
description = "Map arbitrary files as block devices over the network";
license = lib.licenses.gpl2;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ nickcao ];
};
}