diff options
author | Domen Kožar <domen@dev.si> | 2013-07-30 00:54:39 -0700 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2013-07-30 00:54:39 -0700 |
commit | af98eb8de0e06b86a07d8267fb52b4d07b65d5b9 (patch) | |
tree | 05748602db344f8952f9527fc53ceb14a4da49bd /pkgs | |
parent | a0740092ce0f2be164151b6af29083147cf29163 (diff) | |
parent | f2601c5aded96a8e4ea25b23fcc4295e826cfbcd (diff) | |
download | nixpkgs-af98eb8de0e06b86a07d8267fb52b4d07b65d5b9.tar nixpkgs-af98eb8de0e06b86a07d8267fb52b4d07b65d5b9.tar.gz nixpkgs-af98eb8de0e06b86a07d8267fb52b4d07b65d5b9.tar.bz2 nixpkgs-af98eb8de0e06b86a07d8267fb52b4d07b65d5b9.tar.lz nixpkgs-af98eb8de0e06b86a07d8267fb52b4d07b65d5b9.tar.xz nixpkgs-af98eb8de0e06b86a07d8267fb52b4d07b65d5b9.tar.zst nixpkgs-af98eb8de0e06b86a07d8267fb52b4d07b65d5b9.zip |
Merge pull request #752 from lovek323/matplotlib
matplotlib: fix build on darwin
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/top-level/python-packages.nix | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c07129b8def..0162bae4fa2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2560,23 +2560,38 @@ pythonPackages = 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; }; }); |