2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchFromGitHub, buildPythonPackage, pykickstart, pyparted, pyblock
|
2020-11-24 20:58:05 +00:00
|
|
|
, pyudev, six, libselinux, multipath-tools, lsof, util-linux
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "blivet";
|
|
|
|
version = "0.67";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dwlehman";
|
|
|
|
repo = "blivet";
|
|
|
|
rev = "${pname}-${version}";
|
|
|
|
sha256 = "1gk94ghjrxfqnx53hph1j2s7qcv86fjz48is7l099q9c24rjv8ky";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i \
|
|
|
|
-e 's|"multipath"|"${multipath-tools}/sbin/multipath"|' \
|
|
|
|
-e '/^def set_friendly_names/a \ return False' \
|
|
|
|
blivet/devicelibs/mpath.py
|
|
|
|
sed -i -e '/"wipefs"/ {
|
2020-11-24 20:58:05 +00:00
|
|
|
s|wipefs|${util-linux}/sbin/wipefs|
|
2020-04-24 23:36:52 +00:00
|
|
|
s/-f/--force/
|
|
|
|
}' blivet/formats/__init__.py
|
|
|
|
sed -i -e 's|"lsof"|"${lsof}/bin/lsof"|' blivet/formats/fs.py
|
2020-11-24 20:58:05 +00:00
|
|
|
sed -i -r -e 's|"(u?mount)"|"${util-linux}/bin/\1"|' blivet/util.py
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-08-20 17:08:02 +00:00
|
|
|
pykickstart pyparted pyblock pyudev libselinux
|
2020-04-24 23:36:52 +00:00
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://fedoraproject.org/wiki/Blivet";
|
|
|
|
description = "Module for management of a system's storage configuration";
|
|
|
|
license = with licenses; [ gpl2Plus lgpl21Plus ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|