2014-10-22 00:37:32 +01:00
|
|
|
{ stdenv, fetchFromGitHub, buildPythonPackage, pykickstart, pyparted, pyblock
|
2020-11-24 15:29:28 +00:00
|
|
|
, pyudev, six, libselinux, multipath-tools, lsof, util-linux
|
2013-07-02 16:00:39 +01:00
|
|
|
}:
|
|
|
|
|
2020-06-18 14:55:57 +01:00
|
|
|
buildPythonPackage rec {
|
2017-05-27 10:25:35 +01:00
|
|
|
pname = "blivet";
|
2014-10-22 00:37:32 +01:00
|
|
|
version = "0.67";
|
2013-07-02 16:00:39 +01:00
|
|
|
|
2014-10-22 00:37:32 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dwlehman";
|
|
|
|
repo = "blivet";
|
2018-06-23 14:27:58 +01:00
|
|
|
rev = "${pname}-${version}";
|
2014-10-22 00:37:32 +01:00
|
|
|
sha256 = "1gk94ghjrxfqnx53hph1j2s7qcv86fjz48is7l099q9c24rjv8ky";
|
2013-07-02 16:00:39 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2014-10-22 00:37:32 +01:00
|
|
|
sed -i \
|
2016-01-21 15:07:38 +00:00
|
|
|
-e 's|"multipath"|"${multipath-tools}/sbin/multipath"|' \
|
2014-10-22 00:37:32 +01:00
|
|
|
-e '/^def set_friendly_names/a \ return False' \
|
|
|
|
blivet/devicelibs/mpath.py
|
2013-07-02 16:00:39 +01:00
|
|
|
sed -i -e '/"wipefs"/ {
|
2020-11-24 15:29:28 +00:00
|
|
|
s|wipefs|${util-linux}/sbin/wipefs|
|
2013-07-02 16:00:39 +01:00
|
|
|
s/-f/--force/
|
|
|
|
}' blivet/formats/__init__.py
|
|
|
|
sed -i -e 's|"lsof"|"${lsof}/bin/lsof"|' blivet/formats/fs.py
|
2020-11-24 15:29:28 +00:00
|
|
|
sed -i -r -e 's|"(u?mount)"|"${util-linux}/bin/\1"|' blivet/util.py
|
2014-10-22 00:37:32 +01:00
|
|
|
'';
|
2013-07-02 16:00:39 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-06-18 14:55:57 +01:00
|
|
|
pykickstart pyparted pyblock pyudev libselinux
|
2014-10-22 00:37:32 +01:00
|
|
|
six
|
|
|
|
];
|
2013-07-02 16:00:39 +01:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2015-05-27 20:56:04 +01:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://fedoraproject.org/wiki/Blivet";
|
2013-07-02 16:00:39 +01:00
|
|
|
description = "Module for management of a system's storage configuration";
|
2015-05-27 20:56:04 +01:00
|
|
|
license = with licenses; [ gpl2Plus lgpl21Plus ];
|
|
|
|
platforms = platforms.linux;
|
2013-07-02 16:00:39 +01:00
|
|
|
};
|
|
|
|
}
|