nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 80 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 6 perl, 7 pkg-config, 8 9 json_c, 10 libaio, 11 liburcu, 12 linuxHeaders, 13 lvm2, 14 readline, 15 systemd, 16 udevCheckHook, 17 util-linuxMinimal, 18 19 cmocka, 20 nixosTests, 21}: 22 23stdenv.mkDerivation (finalAttrs: { 24 pname = "multipath-tools"; 25 version = "0.11.1"; 26 27 src = fetchFromGitHub { 28 owner = "opensvc"; 29 repo = "multipath-tools"; 30 tag = finalAttrs.version; 31 hash = "sha256-H5DY15On3mFwUHQhmC9s2thm0TUUIZbXM/Ot2FPL41Y="; 32 }; 33 34 nativeBuildInputs = [ 35 perl 36 pkg-config 37 udevCheckHook 38 ]; 39 40 buildInputs = [ 41 json_c 42 libaio 43 liburcu 44 linuxHeaders 45 lvm2 46 readline 47 systemd 48 util-linuxMinimal # for libmount 49 ]; 50 51 strictDeps = true; 52 53 makeFlags = [ 54 "LIB=lib" 55 "prefix=$(out)" 56 "systemd_prefix=$(out)" 57 "kernel_incdir=${linuxHeaders}/include/" 58 "man8dir=$(out)/share/man/man8" 59 "man5dir=$(out)/share/man/man5" 60 "man3dir=$(out)/share/man/man3" 61 ]; 62 63 doCheck = true; 64 preCheck = '' 65 # skip test attempting to access /sys/dev/block 66 substituteInPlace tests/Makefile --replace-fail ' devt ' ' ' 67 ''; 68 checkInputs = [ cmocka ]; 69 70 doInstallCheck = true; 71 72 passthru.tests = { inherit (nixosTests) iscsi-multipath-root; }; 73 74 meta = { 75 description = "Tools for the Linux multipathing storage driver"; 76 homepage = "http://christophe.varoqui.free.fr/"; 77 license = lib.licenses.gpl2Plus; 78 platforms = lib.platforms.linux; 79 }; 80})