Merge pull request #752 from lovek323/matplotlib

matplotlib: fix build on darwin

+24 -9
+24 -9
pkgs/top-level/python-packages.nix
··· 2560 2560 }; 2561 2561 2562 2562 2563 - matplotlib = buildPythonPackage ( rec { 2564 - name = "matplotlib-1.1.0"; 2563 + # not sure if this is the best way to accomplish this -- needed to provide 2564 + # objective-c compiler on darwin 2565 + matplotlibStdenv = if stdenv.isDarwin 2566 + then pkgs.clangStdenv 2567 + else pkgs.stdenv; 2568 + 2569 + matplotlib = matplotlibStdenv.mkDerivation (rec { 2570 + name = "matplotlib-1.2.1"; 2571 + 2565 2572 src = fetchurl { 2566 - url = "mirror://sourceforge/matplotlib/${name}.tar.gz"; 2567 - sha256 = "be37e1d86c65ecacae6683f8805e051e9904e5f2e02bf2b7a34262c46a6d06a7"; 2573 + url = "http://downloads.sourceforge.net/matplotlib/${name}.tar.gz"; 2574 + sha256 = "16x2ksdxx5p92v98qngh29hdz1bnqy77fhggbjq30pyqmrr8kqaj"; 2568 2575 }; 2569 2576 2570 2577 # error: invalid command 'test' 2571 2578 doCheck = false; 2572 2579 2573 - propagatedBuildInputs = [ dateutil numpy pkgs.freetype pkgs.libpng pkgs.pkgconfig pkgs.tcl pkgs.tk pkgs.xlibs.libX11 ]; 2580 + buildInputs = [ python pkgs.which pkgs.ghostscript ]; 2581 + 2582 + propagatedBuildInputs = 2583 + [ dateutil numpy pkgs.freetype pkgs.libpng pkgs.pkgconfig pkgs.tcl 2584 + pkgs.tk pkgs.xlibs.libX11 ]; 2574 2585 2575 - meta = { 2586 + buildPhase = "python setup.py build"; 2587 + 2588 + installPhase = "python setup.py install --prefix=$out"; 2589 + 2590 + meta = with stdenv.lib; { 2576 2591 description = "python plotting library, making publication quality plots"; 2577 - homepage = "http://matplotlib.sourceforge.net/"; 2578 - platforms = stdenv.lib.platforms.linux; 2579 - maintainers = [ stdenv.lib.maintainers.simons ]; 2592 + homepage = "http://matplotlib.sourceforge.net/"; 2593 + maintainers = with maintainers; [ lovek323 simons ]; 2594 + platforms = platforms.unix; 2580 2595 }; 2581 2596 }); 2582 2597