nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 100 lines 1.9 kB view raw
1{ 2 stdenv, 3 testers, 4 fetchurl, 5 autoreconfHook, 6 makeWrapper, 7 pkg-config, 8 bash-completion, 9 gnutls, 10 libtool, 11 curl, 12 xz, 13 zlib-ng, 14 libssh, 15 libnbd, 16 lib, 17 cdrkit, 18 e2fsprogs, 19}: 20 21stdenv.mkDerivation (finalAttrs: { 22 pname = "nbdkit"; 23 version = "1.44.1"; 24 25 src = fetchurl { 26 url = "https://download.libguestfs.org/nbdkit/${lib.versions.majorMinor finalAttrs.version}-stable/nbdkit-${finalAttrs.version}.tar.gz"; 27 hash = "sha256-WQRLqBtYkPBmeK2I4aCt1P7r78fjVLsCOnUEjml1lmM="; 28 }; 29 30 prePatch = '' 31 patchShebangs . 32 ''; 33 34 strictDeps = true; 35 36 nativeBuildInputs = [ 37 bash-completion 38 autoreconfHook 39 makeWrapper 40 pkg-config 41 e2fsprogs # for Autoconf: xorriso, mkisofs 42 cdrkit # for Autoconf: mke2fs 43 ]; 44 45 buildInputs = [ 46 bash-completion 47 gnutls 48 libtool 49 curl 50 xz 51 zlib-ng 52 libssh 53 libnbd 54 e2fsprogs 55 ]; 56 57 configureFlags = [ 58 "--enable-linuxdisk" 59 "--enable-floppy" 60 "--with-ext2" 61 "--with-curl" 62 "--with-iso" 63 "--with-ssh" 64 "--with-zlib" 65 "--with-libnbd" 66 "--disable-rust" 67 "--disable-golang" 68 "--disable-perl" 69 "--disable-ocaml" 70 "--disable-tcl" 71 "--disable-lua" 72 "--without-libguestfs" 73 "--disable-example4" 74 ]; 75 76 installFlags = [ "bashcompdir=$(out)/share/bash-completion/completions" ]; 77 78 postInstall = '' 79 for bin in $out/bin/*; do 80 wrapProgram "$bin" \ 81 --prefix PATH : "$out/bin:${ 82 lib.makeBinPath [ 83 e2fsprogs 84 cdrkit 85 ] 86 }" 87 done 88 ''; 89 90 passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; }; 91 92 meta = { 93 homepage = "https://gitlab.com/nbdkit/nbdkit"; 94 description = "NBD server with stable plugin ABI and permissive license"; 95 license = with lib.licenses; bsd3; 96 maintainers = with lib.maintainers; [ lukts30 ]; 97 platforms = lib.platforms.unix; 98 mainProgram = "nbdkit"; 99 }; 100})