1{stdenv, fetchurl, python, makeWrapper}:
2
3stdenv.mkDerivation rec {
4 name = "PyX-0.10";
5 src = fetchurl {
6 url = "mirror://sourceforge/pyx/${name}.tar.gz";
7 sha256 = "dfaa4a7790661d67d95f80b22044fdd8a9922483631950296ff1d7a9f85c8bba";
8 };
9
10 patchPhase = ''
11 substituteInPlace ./setup.py --replace '"/etc"' '"etc"'
12 '';
13
14 buildInputs = [python makeWrapper];
15 buildPhase = "python ./setup.py build";
16 installPhase = ''
17 python ./setup.py install --prefix="$out" || exit 1
18
19 for i in "$out/bin/"*
20 do
21 # FIXME: We're assuming Python 2.4.
22 wrapProgram "$i" --prefix PYTHONPATH : \
23 "$out/lib/python2.4/site-packages" || \
24 exit 2
25 done
26 '';
27
28 meta = {
29 description = ''Python graphics package'';
30 longDescription = ''
31 PyX is a Python package for the creation of PostScript and PDF
32 files. It combines an abstraction of the PostScript drawing
33 model with a TeX/LaTeX interface. Complex tasks like 2d and 3d
34 plots in publication-ready quality are built out of these
35 primitives.
36 '';
37 license = stdenv.lib.licenses.gpl2;
38 homepage = http://pyx.sourceforge.net/;
39 };
40}