nixpkgs/pkgs/tools/networking/nbd/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
911 B
Nix
Raw Normal View History

2022-07-20 04:20:00 +00:00
{ lib, stdenv, fetchurl, pkg-config, glib, which, bison, nixosTests, linuxHeaders, gnutls }:
2014-03-20 17:07:15 +00:00
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=";
};
2022-07-20 04:20:00 +00:00
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}/"
'';
2022-07-20 04:20:00 +00:00
doCheck = !stdenv.isDarwin;
passthru.tests = {
test = nixosTests.nbd;
};
meta = {
2022-07-20 04:20:00 +00:00
homepage = "https://nbd.sourceforge.io/";
description = "Map arbitrary files as block devices over the network";
2021-01-15 09:19:50 +00:00
license = lib.licenses.gpl2;
2022-07-20 04:20:00 +00:00
platforms = lib.platforms.unix;
};
}