@@ -65,7 +65,12 @@ let
6565
6666 blivet = callPackage ../development/python-modules/blivet { };
6767
68− blivet_0_17 = callPackage ../development/python-modules/blivet/0.17.nix { };
68+ blivet_0_17 = callPackage ../development/python-modules/blivet/0.17.nix {
69+ pyblock = self.pyblock_0_53;
70+ pyparted = self.pyparted_3_10;
71+ multipath_tools = pkgs.multipath_tools_oldlvm2;
72+ cryptsetup = pkgs.cryptsetup_oldlvm2;
73+ };
6974
7075 dbus = callPackage ../development/python-modules/dbus {
7176 dbus = pkgs.dbus;
@@ -6521,6 +6526,35 @@ let
65216526 };
65226527 };
65236528
6529+ # pyblock 0.53 with old LVM, needed for blivet 0.17 and nixpart 0.4
6530+ pyblock_0_53 = stdenv.mkDerivation rec {
6531+ name = "pyblock-${version}";
6532+ version = "0.53";
6533+
6534+ src = pkgs.fetchurl rec {
6535+ url = "http://pkgs.fedoraproject.org/repo/pkgs/python-pyblock/"
6536+ + "${name}.tar.bz2/${md5}/${name}.tar.bz2";
6537+ md5 = "f6d33a8362dee358517d0a9e2ebdd044";
6538+ };
6539+
6540+ postPatch = ''
6541+ sed -i -e 's|/usr/include/python|${python}/include/python|' \
6542+ -e 's/-Werror *//' -e 's|/usr/|'"$out"'/|' Makefile
6543+ '';
6544+
6545+ buildInputs = with self; [ python pkgs.lvm2_2_02_106 pkgs.dmraid_rc15 ];
6546+
6547+ makeFlags = [
6548+ "USESELINUX=0"
6549+ "SITELIB=$(out)/lib/${python.libPrefix}/site-packages"
6550+ ];
6551+
6552+ meta = {
6553+ description = "Interface for working with block devices";
6554+ license = stdenv.lib.licenses.gpl2Plus;
6555+ };
6556+ };
6557+
65246558 pycapnp = buildPythonPackage rec {
65256559 name = "pycapnp-0.4.4";
65266560 disabled = isPyPy || isPy3k;
@@ -6903,6 +6937,49 @@ let
69036937 };
69046938 };
69056939
6940+ # Needed for blivet 0.17 and nixpart 0.4
6941+ pyparted_3_10 = buildPythonPackage rec {
6942+ name = "pyparted-${version}";
6943+ version = "3.10";
6944+ disabled = isPyPy;
6945+
6946+ src = pkgs.fetchurl {
6947+ url = "https://fedorahosted.org/releases/p/y/pyparted/${name}.tar.gz";
6948+ sha256 = "17wq4invmv1nfazaksf59ymqyvgv3i8h4q03ry2az0s9lldyg3dv";
6949+ };
6950+
6951+ postPatch = ''
6952+ sed -i -e 's|/sbin/mke2fs|${pkgs.e2fsprogs}&|' tests/baseclass.py
6953+ sed -i -e '
6954+ s|e\.path\.startswith("/tmp/temp-device-")|"temp-device-" in e.path|
6955+ ' tests/test__ped_ped.py
6956+ '' + optionalString stdenv.isi686 ''
6957+ # remove some integers in this test case which overflow on 32bit systems
6958+ sed -i -r -e '/class *UnitGetSizeTestCase/,/^$/{/[0-9]{11}/d}' \
6959+ tests/test__ped_ped.py
6960+ '';
6961+
6962+ preConfigure = ''
6963+ PATH="${pkgs.parted}/sbin:$PATH"
6964+ '';
6965+
6966+ buildInputs = with self; [ pkgs.pkgconfig ];
6967+
6968+ propagatedBuildInputs = with self; [ pkgs.parted_3_1 ];
6969+
6970+ checkPhase = ''
6971+ patchShebangs Makefile
6972+ make test PYTHON=${python.executable}
6973+ '';
6974+
6975+ meta = {
6976+ homepage = "https://fedorahosted.org/pyparted/";
6977+ description = "Python interface for libparted";
6978+ license = stdenv.lib.licenses.gpl2Plus;
6979+ platforms = stdenv.lib.platforms.linux;
6980+ };
6981+ };
6982+
69066983
69076984 pyptlib = buildPythonPackage (rec {
69086985 name = "pyptlib-${version}";