diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 431e9c6a28e..376d5dc3d1a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3647,6 +3647,43 @@ pythonPackages = python.modules // rec { }; }; + + pyparted = buildPythonPackage rec { + name = "pyparted-${version}"; + version = "3.10"; + + src = fetchurl { + url = "https://fedorahosted.org/releases/p/y/pyparted/${name}.tar.gz"; + sha256 = "17wq4invmv1nfazaksf59ymqyvgv3i8h4q03ry2az0s9lldyg3dv"; + }; + + postPatch = '' + sed -i -e 's|/sbin/mke2fs|${pkgs.e2fsprogs}&|' tests/baseclass.py + sed -i -e ' + s|e\.path\.startswith("/tmp/temp-device-")|"temp-device-" in e.path| + ' tests/test__ped_ped.py + ''; + + preConfigure = '' + PATH="${pkgs.parted}/sbin:$PATH" + ''; + + buildInputs = [ pkgs.pkgconfig ]; + + propagatedBuildInputs = [ pkgs.parted ]; + + checkPhase = '' + python -m unittest discover -v + ''; + + meta = { + homepage = "https://fedorahosted.org/pyparted/"; + description = "Python interface for libparted"; + license = pkgs.lib.licenses.gpl2Plus; + }; + }; + + pyptlib = buildPythonPackage (rec { name = "pyptlib-${version}"; version = "0.0.3";