about summary refs log tree commit diff
path: root/pkgs/development/interpreters/octave/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/octave/default.nix')
-rw-r--r--pkgs/development/interpreters/octave/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix
index b32d15b2a1f9c..4a63d1862014c 100644
--- a/pkgs/development/interpreters/octave/default.nix
+++ b/pkgs/development/interpreters/octave/default.nix
@@ -49,6 +49,8 @@
 # - JIT compiler for loops:
 , enableJIT ? false
 , llvm ? null
+, libiconv
+, darwin
 }:
 
 let
@@ -107,10 +109,13 @@ stdenv.mkDerivation rec {
   ++ (stdenv.lib.optional (gnuplot != null) gnuplot)
   ++ (stdenv.lib.optional (python != null) python)
   ++ (stdenv.lib.optionals (!stdenv.isDarwin) [ libGL libGLU libX11 ])
+  ++ (stdenv.lib.optionals (stdenv.isDarwin) [ libiconv
+                                               darwin.apple_sdk.frameworks.Accelerate
+                                               darwin.apple_sdk.frameworks.Cocoa ])
   ;
   nativeBuildInputs = [
     pkgconfig
-    gfortran 
+    gfortran
     # Listed here as well because it's outputs are split
     fftw
     fftwSinglePrec
@@ -135,6 +140,7 @@ stdenv.mkDerivation rec {
     "--with-blas=openblas"
     "--with-lapack=openblas"
   ]
+    ++ (if stdenv.isDarwin then [ "--enable-link-all-dependencies" ] else [ ])
     ++ stdenv.lib.optionals enableReadline [ "--enable-readline" ]
     ++ stdenv.lib.optionals openblas.blas64 [ "--enable-64" ]
     ++ stdenv.lib.optionals stdenv.isDarwin [ "--with-x=no" ]
@@ -161,7 +167,7 @@ stdenv.mkDerivation rec {
     # https://savannah.gnu.org/bugs/?func=detailitem&item_id=56425 is the best attempt to fix JIT
     broken = enableJIT;
     platforms = if overridePlatforms == null then
-      (with stdenv.lib.platforms; linux ++ darwin)
+      (with stdenv.lib; platforms.linux ++ platforms.darwin)
     else overridePlatforms;
   };
 }