@@ -1,52 +1,42 @@
1−{ stdenv, fetchurl, buildPythonPackage, pykickstart, pyparted, pyblock
2−, libselinux, cryptsetup, multipath_tools, lsof, utillinux
3−, useNixUdev ? true, udev ? null
4−# This is only used when useNixUdev is false
5−, udevSoMajor ? 1
1+{ stdenv, fetchFromGitHub, buildPythonPackage, pykickstart, pyparted, pyblock
2+, pyudev, six, libselinux, cryptsetup, multipath_tools, lsof, utillinux
63}:
74
8−assert useNixUdev -> udev != null;
9−
105let
116 pyenable = { enablePython = true; };
127 selinuxWithPython = libselinux.override pyenable;
138 cryptsetupWithPython = cryptsetup.override pyenable;
149in buildPythonPackage rec {
1510 name = "blivet-${version}";
16− version = "0.17-1";
11+ version = "0.67";
1712
18− src = fetchurl {
19− url = "https://git.fedorahosted.org/cgit/blivet.git/snapshot/"
20− + "${name}.tar.bz2";
21− sha256 = "1k3mws2q0ryb7422mml6idmaasz2i2v6ngyvg6d976dx090qnmci";
13+ src = fetchFromGitHub {
14+ owner = "dwlehman";
15+ repo = "blivet";
16+ rev = name;
17+ sha256 = "1gk94ghjrxfqnx53hph1j2s7qcv86fjz48is7l099q9c24rjv8ky";
2218 };
2319
2420 postPatch = ''
25− sed -i -e 's|"multipath"|"${multipath_tools}/sbin/multipath"|' \
26− blivet/devicelibs/mpath.py blivet/devices.py
21+ sed -i \
22+ -e 's|"multipath"|"${multipath_tools}/sbin/multipath"|' \
23+ -e '/^def set_friendly_names/a \ return False' \
24+ blivet/devicelibs/mpath.py
2725 sed -i -e '/"wipefs"/ {
2826 s|wipefs|${utillinux}/sbin/wipefs|
2927 s/-f/--force/
3028 }' blivet/formats/__init__.py
3129 sed -i -e 's|"lsof"|"${lsof}/bin/lsof"|' blivet/formats/fs.py
3230 sed -i -r -e 's|"(u?mount)"|"${utillinux}/bin/\1"|' blivet/util.py
33− sed -i '/pvscan/s/, *"--cache"//' blivet/devicelibs/lvm.py
34− '' + (if useNixUdev then ''
35− sed -i -e '/find_library/,/find_library/ {
36− c libudev = "${udev}/lib/libudev.so.1"
37− }' blivet/pyudev.py
38− '' else ''
39− sed -i \
40− -e '/^somajor *=/s/=.*/= ${toString udevSoMajor}/p' \
41− -e 's|common =.*|& + ["/lib/x86_64-linux-gnu", "/lib/i686-linux-gnu"]|' \
42− blivet/pyudev.py
43− '');
31+ sed -i -e '/pvscan/s/, *"--cache"//' blivet/devicelibs/lvm.py
32+ '';
4433
4534 propagatedBuildInputs = [
46− pykickstart pyparted pyblock selinuxWithPython cryptsetupWithPython
47− ] ++ stdenv.lib.optional useNixUdev udev;
35+ pykickstart pyparted pyblock pyudev selinuxWithPython cryptsetupWithPython
36+ six
37+ ];
4838
49− # tests are currently _heavily_ broken upstream
39+ # Tests are in <nixos/tests/blivet.nix>.
5040 doCheck = false;
5141
5242 meta = {