nixpkgs/pkgs/tools/networking/nbd/default.nix
William A. Kennington III 912dd5a356 nbd: 3.8 -> 3.10
2015-03-26 14:03:51 -07:00

33 lines
1 KiB
Nix

{ stdenv, fetchurl, pkgconfig, glib }:
stdenv.mkDerivation rec {
name = "nbd-3.10";
src = fetchurl {
url = "mirror://sourceforge/nbd/${name}.tar.xz";
sha256 = "1kj772zv6s3rjmvr0gi3yhagzlq2nmv5n5gfhrjphv5bcxx3mibg";
};
buildInputs = [ pkgconfig glib ] ++ stdenv.lib.optional (stdenv ? glibc) stdenv.glibc.kernelHeaders;
postInstall = ''
mkdir -p "$out/share/doc/${name}"
cp README.md "$out/share/doc/${name}/"
'';
# The test suite doesn't succeed in chroot builds.
doCheck = false;
# Glib calls `clock_gettime', which is in librt. Linking that library
# here ensures that a proper rpath is added to the executable so that
# it can be loaded at run-time.
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lrt -lpthread";
meta = {
homepage = "http://nbd.sourceforge.net";
description = "map arbitrary files as block devices over the network";
license = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.simons ];
platforms = stdenv.lib.platforms.unix;
};
}