3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/nbd/default.nix
Alyssa Ross 35424a99fd
nbd: remove NIX_LDFLAGS hack
There is no Linux libc supported by Nixpkgs where these are separate
libraries any more.  (They're empty stubs.)
2023-01-23 15:55:58 +00:00

35 lines
863 B
Nix

{ lib, stdenv, fetchurl, pkg-config, glib, which, bison, nixosTests, linuxHeaders, gnutls }:
stdenv.mkDerivation rec {
pname = "nbd";
version = "3.24";
src = fetchurl {
url = "mirror://sourceforge/nbd/nbd-${version}.tar.xz";
sha256 = "sha256-aHcVbSOnsz917uidL1wskcVCr8PNy2Nt6lqIU5pY0Qw=";
};
buildInputs = [ glib gnutls ]
++ lib.optionals stdenv.isLinux [ linuxHeaders ];
nativeBuildInputs = [ pkg-config which bison ];
postInstall = ''
mkdir -p "$out/share/doc/nbd-${version}"
cp README.md "$out/share/doc/nbd-${version}/"
'';
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;
};
}