From 63c937ba069f6d75632a863867b542f6fadd67b7 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 24 Jun 2013 08:33:09 +0200 Subject: [PATCH] python-packages: Add new package pyparted v3.10. This is one of our required dependencies for the soon-to-be-packaged blivet library. Signed-off-by: aszlig --- pkgs/top-level/python-packages.nix | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) 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";