a0cb138ada
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
34 lines
863 B
Nix
34 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;
|
|
};
|
|
}
|