From f2601c5aded96a8e4ea25b23fcc4295e826cfbcd Mon Sep 17 00:00:00 2001 From: "Jason \"Don\" O'Conal" Date: Sun, 14 Jul 2013 13:41:56 +1000 Subject: [PATCH] matplotlib: fix build on darwin * build with clangStdenv * update to 1.2.1 --- pkgs/top-level/python-packages.nix | 33 ++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9ae389d8e699..bf9746bbcd3e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2581,23 +2581,38 @@ pythonPackages = python.modules // rec { }; - matplotlib = buildPythonPackage ( rec { - name = "matplotlib-1.1.0"; + # not sure if this is the best way to accomplish this -- needed to provide + # objective-c compiler on darwin + matplotlibStdenv = if stdenv.isDarwin + then pkgs.clangStdenv + else pkgs.stdenv; + + matplotlib = matplotlibStdenv.mkDerivation (rec { + name = "matplotlib-1.2.1"; + src = fetchurl { - url = "mirror://sourceforge/matplotlib/${name}.tar.gz"; - sha256 = "be37e1d86c65ecacae6683f8805e051e9904e5f2e02bf2b7a34262c46a6d06a7"; + url = "http://downloads.sourceforge.net/matplotlib/${name}.tar.gz"; + sha256 = "16x2ksdxx5p92v98qngh29hdz1bnqy77fhggbjq30pyqmrr8kqaj"; }; # error: invalid command 'test' doCheck = false; - propagatedBuildInputs = [ dateutil numpy pkgs.freetype pkgs.libpng pkgs.pkgconfig pkgs.tcl pkgs.tk pkgs.xlibs.libX11 ]; + buildInputs = [ python pkgs.which pkgs.ghostscript ]; - meta = { + propagatedBuildInputs = + [ dateutil numpy pkgs.freetype pkgs.libpng pkgs.pkgconfig pkgs.tcl + pkgs.tk pkgs.xlibs.libX11 ]; + + buildPhase = "python setup.py build"; + + installPhase = "python setup.py install --prefix=$out"; + + meta = with stdenv.lib; { description = "python plotting library, making publication quality plots"; - homepage = "http://matplotlib.sourceforge.net/"; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.simons ]; + homepage = "http://matplotlib.sourceforge.net/"; + maintainers = with maintainers; [ lovek323 simons ]; + platforms = platforms.unix; }; });