Merge pull request #83185 from idontgetoutmuch/octave-for-macos
Build octave on macos
This commit is contained in:
commit
db4ccddb35
1 changed files with 8 additions and 2 deletions
|
@ -49,6 +49,8 @@
|
||||||
# - JIT compiler for loops:
|
# - JIT compiler for loops:
|
||||||
, enableJIT ? false
|
, enableJIT ? false
|
||||||
, llvm ? null
|
, llvm ? null
|
||||||
|
, libiconv
|
||||||
|
, darwin
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -107,10 +109,13 @@ stdenv.mkDerivation rec {
|
||||||
++ (stdenv.lib.optional (gnuplot != null) gnuplot)
|
++ (stdenv.lib.optional (gnuplot != null) gnuplot)
|
||||||
++ (stdenv.lib.optional (python != null) python)
|
++ (stdenv.lib.optional (python != null) python)
|
||||||
++ (stdenv.lib.optionals (!stdenv.isDarwin) [ libGL libGLU libX11 ])
|
++ (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 = [
|
nativeBuildInputs = [
|
||||||
pkgconfig
|
pkgconfig
|
||||||
gfortran
|
gfortran
|
||||||
# Listed here as well because it's outputs are split
|
# Listed here as well because it's outputs are split
|
||||||
fftw
|
fftw
|
||||||
fftwSinglePrec
|
fftwSinglePrec
|
||||||
|
@ -135,6 +140,7 @@ stdenv.mkDerivation rec {
|
||||||
"--with-blas=openblas"
|
"--with-blas=openblas"
|
||||||
"--with-lapack=openblas"
|
"--with-lapack=openblas"
|
||||||
]
|
]
|
||||||
|
++ (if stdenv.isDarwin then [ "--enable-link-all-dependencies" ] else [ ])
|
||||||
++ stdenv.lib.optionals enableReadline [ "--enable-readline" ]
|
++ stdenv.lib.optionals enableReadline [ "--enable-readline" ]
|
||||||
++ stdenv.lib.optionals openblas.blas64 [ "--enable-64" ]
|
++ stdenv.lib.optionals openblas.blas64 [ "--enable-64" ]
|
||||||
++ stdenv.lib.optionals stdenv.isDarwin [ "--with-x=no" ]
|
++ 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
|
# https://savannah.gnu.org/bugs/?func=detailitem&item_id=56425 is the best attempt to fix JIT
|
||||||
broken = enableJIT;
|
broken = enableJIT;
|
||||||
platforms = if overridePlatforms == null then
|
platforms = if overridePlatforms == null then
|
||||||
(with stdenv.lib.platforms; linux ++ darwin)
|
(with stdenv.lib; platforms.linux ++ platforms.darwin)
|
||||||
else overridePlatforms;
|
else overridePlatforms;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue