diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix index 3389620cdd94..df443cdc3e18 100644 --- a/pkgs/development/interpreters/octave/default.nix +++ b/pkgs/development/interpreters/octave/default.nix @@ -25,9 +25,9 @@ stdenv.mkDerivation rec { sha256 = "11y2w6jgngj4rxiy136mkcs02l52rxk60kapyfc4rgrxz5hli3ym"; }; - buildInputs = [ gfortran readline ncurses perl flex texinfo qhull libX11 - graphicsmagick pcre pkgconfig mesa fltk zlib curl openblas libsndfile - fftw fftwSinglePrec qrupdate arpack libwebp ] + buildInputs = [ gfortran readline ncurses perl flex texinfo qhull + graphicsmagick pcre pkgconfig fltk zlib curl openblas libsndfile fftw + fftwSinglePrec qrupdate arpack libwebp ] ++ (stdenv.lib.optional (qt != null) qt) ++ (stdenv.lib.optional (qscintilla != null) qscintilla) ++ (stdenv.lib.optional (ghostscript != null) ghostscript) @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { ++ (stdenv.lib.optional (jdk != null) jdk) ++ (stdenv.lib.optional (gnuplot != null) gnuplot) ++ (stdenv.lib.optional (python != null) python) - ++ (stdenv.lib.optionals (!stdenv.isDarwin) [mesa libX11]) + ++ (stdenv.lib.optionals (!stdenv.isDarwin) [ mesa libX11 ]) ; doCheck = !stdenv.isDarwin; diff --git a/pkgs/development/libraries/fltk/default.nix b/pkgs/development/libraries/fltk/default.nix index 99cb8aae3236..6f906d52502e 100644 --- a/pkgs/development/libraries/fltk/default.nix +++ b/pkgs/development/libraries/fltk/default.nix @@ -21,6 +21,8 @@ composableDerivation.composableDerivation {} { --replace 'class Fl_XFont_On_Demand' 'class FL_EXPORT Fl_XFont_On_Demand' ''; + patches = stdenv.lib.optionals stdenv.isDarwin [ ./nsosv.patch ]; + nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ inputproto ] ++ (if stdenv.isDarwin diff --git a/pkgs/development/libraries/fltk/nsosv.patch b/pkgs/development/libraries/fltk/nsosv.patch new file mode 100644 index 000000000000..9e55b011b571 --- /dev/null +++ b/pkgs/development/libraries/fltk/nsosv.patch @@ -0,0 +1,20 @@ +diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm +index 6f5b8b1..2c7763d 100644 +--- a/src/Fl_cocoa.mm ++++ b/src/Fl_cocoa.mm +@@ -4074,15 +4074,6 @@ Window fl_xid(const Fl_Window* w) + static int calc_mac_os_version() { + int M, m, b = 0; + NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init]; +-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10 +- if ([NSProcessInfo instancesRespondToSelector:@selector(operatingSystemVersion)]) { +- NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion]; +- M = version.majorVersion; +- m = version.minorVersion; +- b = version.patchVersion; +- } +- else +-#endif + { + NSDictionary * sv = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"]; + const char *s = [[sv objectForKey:@"ProductVersion"] UTF8String]; diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index 0cc79f6b44bc..3893875a2347 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation { makeFlags = (if local then localFlags else genericFlags) ++ - optionals stdenv.isDarwin ["MACOSX_DEPLOYMENT_TARGET=10.9"] + optionals stdenv.isDarwin ["MACOSX_DEPLOYMENT_TARGET=10.7"] ++ [ "FC=gfortran" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e7ee9e84f964..159c90c0273a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5483,7 +5483,7 @@ in glpk = null; suitesparse = null; jdk = null; - openblas = openblas; + openblas = if stdenv.isDarwin then openblasCompat else openblas; }; octaveFull = (lowPrio (callPackage ../development/interpreters/octave { qt = qt4;