at v206 33 lines 1.0 kB view raw
1{ stdenv, fetchurl, pkgconfig, glib }: 2 3stdenv.mkDerivation rec { 4 name = "nbd-3.11"; 5 6 src = fetchurl { 7 url = "mirror://sourceforge/nbd/${name}.tar.xz"; 8 sha256 = "187jwc43dhxbv9rrszimm3bvwr1hcpyixv82jfd61p0nrds0yhhl"; 9 }; 10 11 buildInputs = [ pkgconfig glib ] ++ stdenv.lib.optional (stdenv ? glibc) stdenv.glibc.kernelHeaders; 12 13 postInstall = '' 14 mkdir -p "$out/share/doc/${name}" 15 cp README.md "$out/share/doc/${name}/" 16 ''; 17 18 # The test suite doesn't succeed in chroot builds. 19 doCheck = false; 20 21 # Glib calls `clock_gettime', which is in librt. Linking that library 22 # here ensures that a proper rpath is added to the executable so that 23 # it can be loaded at run-time. 24 NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lrt -lpthread"; 25 26 meta = { 27 homepage = "http://nbd.sourceforge.net"; 28 description = "map arbitrary files as block devices over the network"; 29 license = stdenv.lib.licenses.gpl2; 30 maintainers = [ stdenv.lib.maintainers.simons ]; 31 platforms = stdenv.lib.platforms.unix; 32 }; 33}