summaryrefslogtreecommitdiffstats
path: root/pkgs/development/interpreters/octave
diff options
context:
space:
mode:
authorDominic Steinitz <dominic@steinitz.org>2020-03-23 06:31:11 +0000
committerDominic Steinitz <dominic@steinitz.org>2020-03-23 06:31:11 +0000
commit6d196e8c9292e4d6dacd6a66bf8b139410d7edf4 (patch)
tree5ac75e6c4fd448b2ec4653ee50c2446eb6a5d693 /pkgs/development/interpreters/octave
parent7b389de077dd3b4654897d555d37f92669a7531d (diff)
Build octave on macos
Diffstat (limited to 'pkgs/development/interpreters/octave')
-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 b32d15b2a1f9..4a63d1862014 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;
};
}