summary refs log tree commit diff
path: root/pkgs/tools/filesystems/nixpart/0.4/pykickstart.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/filesystems/nixpart/0.4/pykickstart.nix')
-rw-r--r--pkgs/tools/filesystems/nixpart/0.4/pykickstart.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/nixpart/0.4/pykickstart.nix b/pkgs/tools/filesystems/nixpart/0.4/pykickstart.nix
new file mode 100644
index 00000000000..7bc3f54c236
--- /dev/null
+++ b/pkgs/tools/filesystems/nixpart/0.4/pykickstart.nix
@@ -0,0 +1,30 @@
+{ stdenv, python, buildPythonPackage, fetchurl, urlgrabber }:
+
+buildPythonPackage rec {
+  name = "pykickstart-${version}";
+  version = "1.99.39";
+
+  src = fetchurl rec {
+    url = "http://pkgs.fedoraproject.org/repo/pkgs/pykickstart/"
+        + "${name}.tar.gz/${md5}/${name}.tar.gz";
+    md5 = "d249f60aa89b1b4facd63f776925116d";
+  };
+
+  postPatch = ''
+    sed -i -e "s/for tst in tstList/for tst in sorted(tstList, \
+               key=lambda m: m.__name__)/" tests/baseclass.py
+  '';
+
+  propagatedBuildInputs = [ urlgrabber ];
+
+  checkPhase = ''
+    export PYTHONPATH="$PYTHONPATH:."
+    ${python}/bin/${python.executable} tests/baseclass.py -vv
+  '';
+
+  meta = {
+    homepage = "http://fedoraproject.org/wiki/Pykickstart";
+    description = "Read and write Fedora kickstart files";
+    license = stdenv.lib.licenses.gpl2Plus;
+  };
+}