Merge pull request #10542 from datakurre/datakurre-matplotlib
darwin: matplotlib: add needed inputs and set framework flag for darwin
This commit is contained in:
commit
403d088b5c
@ -0,0 +1,10 @@
|
|||||||
|
--- a/src/_macosx.m 2015-10-30 00:46:20.000000000 +0200
|
||||||
|
+++ b/src/_macosx.m 2015-11-01 14:52:25.000000000 +0200
|
||||||
|
@@ -6264,6 +6264,7 @@
|
||||||
|
|
||||||
|
static bool verify_framework(void)
|
||||||
|
{
|
||||||
|
+ return true; /* nixpkgs darwin stdenv */
|
||||||
|
#ifdef COMPILING_FOR_10_6
|
||||||
|
NSRunningApplication* app = [NSRunningApplication currentApplication];
|
||||||
|
NSApplicationActivationPolicy activationPolicy = [app activationPolicy];
|
@ -4,6 +4,7 @@
|
|||||||
, enableGhostscript ? false, ghostscript ? null, gtk3
|
, enableGhostscript ? false, ghostscript ? null, gtk3
|
||||||
, enableGtk2 ? false, pygtk ? null, gobjectIntrospection
|
, enableGtk2 ? false, pygtk ? null, gobjectIntrospection
|
||||||
, enableGtk3 ? false, cairo
|
, enableGtk3 ? false, cairo
|
||||||
|
, Cocoa, Foundation, CoreData, cf-private, libobjc, libcxx
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert enableGhostscript -> ghostscript != null;
|
assert enableGhostscript -> ghostscript != null;
|
||||||
@ -18,10 +19,14 @@ buildPythonPackage rec {
|
|||||||
sha256 = "67b08b1650a00a6317d94b76a30a47320087e5244920604c5462188cba0c2646";
|
sha256 = "67b08b1650a00a6317d94b76a30a47320087e5244920604c5462188cba0c2646";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
|
||||||
|
|
||||||
XDG_RUNTIME_DIR = "/tmp";
|
XDG_RUNTIME_DIR = "/tmp";
|
||||||
|
|
||||||
buildInputs = [ python which sphinx stdenv ]
|
buildInputs = [ python which sphinx stdenv ]
|
||||||
++ stdenv.lib.optional enableGhostscript ghostscript;
|
++ stdenv.lib.optional enableGhostscript ghostscript
|
||||||
|
++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa Foundation CoreData
|
||||||
|
cf-private libobjc ];
|
||||||
|
|
||||||
propagatedBuildInputs =
|
propagatedBuildInputs =
|
||||||
[ cycler dateutil nose numpy pyparsing tornado freetype
|
[ cycler dateutil nose numpy pyparsing tornado freetype
|
||||||
@ -30,7 +35,9 @@ buildPythonPackage rec {
|
|||||||
++ stdenv.lib.optional enableGtk2 pygtk
|
++ stdenv.lib.optional enableGtk2 pygtk
|
||||||
++ stdenv.lib.optionals enableGtk3 [ cairo pycairo gtk3 gobjectIntrospection pygobject3 ];
|
++ stdenv.lib.optionals enableGtk3 [ cairo pycairo gtk3 gobjectIntrospection pygobject3 ];
|
||||||
|
|
||||||
patchPhase = ''
|
patches = stdenv.lib.optionals stdenv.isDarwin [ ./darwin-stdenv.patch ];
|
||||||
|
|
||||||
|
prePatch = ''
|
||||||
# Failing test: ERROR: matplotlib.tests.test_style.test_use_url
|
# Failing test: ERROR: matplotlib.tests.test_style.test_use_url
|
||||||
sed -i 's/test_use_url/fails/' lib/matplotlib/tests/test_style.py
|
sed -i 's/test_use_url/fails/' lib/matplotlib/tests/test_style.py
|
||||||
# Failing test: ERROR: test suite for <class 'matplotlib.sphinxext.tests.test_tinypages.TestTinyPages'>
|
# Failing test: ERROR: test suite for <class 'matplotlib.sphinxext.tests.test_tinypages.TestTinyPages'>
|
||||||
@ -39,7 +46,6 @@ buildPythonPackage rec {
|
|||||||
sed -i 's/test_invisible_Line_rendering/noop/' lib/matplotlib/tests/test_lines.py
|
sed -i 's/test_invisible_Line_rendering/noop/' lib/matplotlib/tests/test_lines.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "python plotting library, making publication quality plots";
|
description = "python plotting library, making publication quality plots";
|
||||||
homepage = "http://matplotlib.sourceforge.net/";
|
homepage = "http://matplotlib.sourceforge.net/";
|
||||||
|
@ -9318,6 +9318,8 @@ in modules // {
|
|||||||
matplotlib = callPackage ../development/python-modules/matplotlib/default.nix {
|
matplotlib = callPackage ../development/python-modules/matplotlib/default.nix {
|
||||||
stdenv = if stdenv.isDarwin then pkgs.clangStdenv else pkgs.stdenv;
|
stdenv = if stdenv.isDarwin then pkgs.clangStdenv else pkgs.stdenv;
|
||||||
enableGhostscript = true;
|
enableGhostscript = true;
|
||||||
|
inherit (pkgs.darwin.apple_sdk.frameworks) Cocoa Foundation CoreData;
|
||||||
|
inherit (pkgs.darwin) cf-private libobjc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user