pythonPackages: use mkPythonDerivation

This commit is contained in:
Frederik Rietdijk
2016-08-31 11:01:16 +02:00
parent e9c4d00cac
commit 4f6b6f1472
13 changed files with 56 additions and 65 deletions

View File

@@ -1,22 +1,21 @@
{stdenv, fetchurl, python, makeWrapper}:
{lib, fetchurl, python, mkPythonDerivation, makeWrapper}:
stdenv.mkDerivation rec {
mkPythonDerivation rec {
name = "PyXML-0.8.4";
src = fetchurl {
url = "mirror://sourceforge/pyxml/${name}.tar.gz";
sha256 = "04wc8i7cdkibhrldy6j65qp5l75zjxf5lx6qxdxfdf2gb3wndawz";
};
buildInputs = [python makeWrapper];
buildPhase = "python ./setup.py build";
buildInputs = [ makeWrapper ];
buildPhase = "${python.interpreter} ./setup.py build";
installPhase = ''
python ./setup.py install --prefix="$out" || exit 1
${python.interpreter} ./setup.py install --prefix="$out" || exit 1
for i in "$out/bin/"*
do
# FIXME: We're assuming Python 2.4.
wrapProgram "$i" --prefix PYTHONPATH : \
"$out/lib/python2.4/site-packages" || \
"$out/${python.sitePackages}" || \
exit 2
done
'';