Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 45 lines 1.3 kB view raw
1{ stdenv, fetchFromGitHub, buildPythonPackage, pykickstart, pyparted, pyblock 2, pyudev, six, libselinux, cryptsetup, multipath-tools, lsof, utillinux 3}: 4 5let 6 pyenable = { enablePython = true; }; 7 cryptsetupWithPython = cryptsetup.override pyenable; 8in buildPythonPackage rec { 9 pname = "blivet"; 10 version = "0.67"; 11 12 src = fetchFromGitHub { 13 owner = "dwlehman"; 14 repo = "blivet"; 15 rev = "${pname}-${version}"; 16 sha256 = "1gk94ghjrxfqnx53hph1j2s7qcv86fjz48is7l099q9c24rjv8ky"; 17 }; 18 19 postPatch = '' 20 sed -i \ 21 -e 's|"multipath"|"${multipath-tools}/sbin/multipath"|' \ 22 -e '/^def set_friendly_names/a \ return False' \ 23 blivet/devicelibs/mpath.py 24 sed -i -e '/"wipefs"/ { 25 s|wipefs|${utillinux}/sbin/wipefs| 26 s/-f/--force/ 27 }' blivet/formats/__init__.py 28 sed -i -e 's|"lsof"|"${lsof}/bin/lsof"|' blivet/formats/fs.py 29 sed -i -r -e 's|"(u?mount)"|"${utillinux}/bin/\1"|' blivet/util.py 30 ''; 31 32 propagatedBuildInputs = [ 33 pykickstart pyparted pyblock pyudev libselinux cryptsetupWithPython 34 six 35 ]; 36 37 doCheck = false; 38 39 meta = with stdenv.lib; { 40 homepage = https://fedoraproject.org/wiki/Blivet; 41 description = "Module for management of a system's storage configuration"; 42 license = with licenses; [ gpl2Plus lgpl21Plus ]; 43 platforms = platforms.linux; 44 }; 45}