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