1{ stdenv, fetchurl, python, buildPythonPackage, pycairo
2, which, dateutil, nose, numpy, pyparsing, tornado
3, freetype, libpng, pkgconfig, mock, pytz, pygobject3
4, enableGhostscript ? false, ghostscript ? null, gtk3
5, enableGtk2 ? false, pygtk ? null, gobjectIntrospection
6, enableGtk3 ? false, cairo
7}:
8
9assert enableGhostscript -> ghostscript != null;
10assert enableGtk2 -> pygtk != null;
11
12buildPythonPackage rec {
13 name = "matplotlib-1.4.3";
14
15 src = fetchurl {
16 url = "mirror://sourceforge/matplotlib/${name}.tar.gz";
17 sha256 = "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av";
18 };
19
20 XDG_RUNTIME_DIR = "/tmp";
21
22 buildInputs = [ python which stdenv ]
23 ++ stdenv.lib.optional enableGhostscript ghostscript;
24
25 propagatedBuildInputs =
26 [ dateutil nose numpy pyparsing tornado freetype
27 libpng pkgconfig mock pytz
28 ]
29 ++ stdenv.lib.optional enableGtk2 pygtk
30 ++ stdenv.lib.optionals enableGtk3 [ cairo pycairo gtk3 gobjectIntrospection pygobject3 ];
31
32 meta = with stdenv.lib; {
33 description = "python plotting library, making publication quality plots";
34 homepage = "http://matplotlib.sourceforge.net/";
35 maintainers = with maintainers; [ lovek323 ];
36 platforms = platforms.unix;
37 };
38}