depot/third_party/nixpkgs/pkgs/development/python-modules/pykickstart/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

38 lines
922 B
Nix

{ stdenv
, buildPythonPackage
, fetchurl
, urlgrabber
, python
, isPy3k
}:
buildPythonPackage rec {
pname = "pykickstart";
version = "1.99.39";
md5_path = "d249f60aa89b1b4facd63f776925116d";
disabled = isPy3k;
src = fetchurl {
url = "https://src.fedoraproject.org/repo/pkgs/pykickstart/"
+ "${pname}-${version}.tar.gz/${md5_path}/${pname}-${version}.tar.gz";
sha256 = "e0d0f98ac4c5607e6a48d5c1fba2d50cc804de1081043f9da68cbfc69cad957a";
};
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 = ''
${python.interpreter} tests/baseclass.py -vv
'';
meta = with stdenv.lib; {
homepage = "http://fedoraproject.org/wiki/Pykickstart";
description = "Read and write Fedora kickstart files";
license = licenses.gpl2Plus;
};
}