diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix index 9ad8c2790da6..bdf6f7752777 100644 --- a/pkgs/development/interpreters/octave/default.nix +++ b/pkgs/development/interpreters/octave/default.nix @@ -1,10 +1,22 @@ { stdenv, fetchurl, gfortran, readline, ncurses, perl, flex, texinfo, qhull -, libX11, graphicsmagick, pcre, liblapack, pkgconfig, mesa, fltk -, fftw, fftwSinglePrec, zlib, curl, qrupdate +, libX11, graphicsmagick, pcre, pkgconfig, mesa, fltk +, fftw, fftwSinglePrec, zlib, curl, qrupdate, openblas , qt ? null, qscintilla ? null, ghostscript ? null, llvm ? null, hdf5 ? null,glpk ? null , suitesparse ? null, gnuplot ? null, jdk ? null, python ? null }: +let + suitesparseOrig = suitesparse; + qrupdateOrig = qrupdate; +in +# integer width is determined by openblas, so all dependencies must be built +# with exactly the same openblas +let + suitesparse = + if suitesparseOrig != null then suitesparseOrig.override { inherit openblas; } else null; + qrupdate = if qrupdateOrig != null then qrupdateOrig.override { inherit openblas; } else null; +in + stdenv.mkDerivation rec { version = "4.0.0"; name = "octave-${version}"; @@ -14,7 +26,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ gfortran readline ncurses perl flex texinfo qhull libX11 - graphicsmagick pcre liblapack pkgconfig mesa fltk zlib curl + graphicsmagick pcre pkgconfig mesa fltk zlib curl openblas fftw fftwSinglePrec qrupdate ] ++ (stdenv.lib.optional (qt != null) qt) ++ (stdenv.lib.optional (qscintilla != null) qscintilla) @@ -34,7 +46,13 @@ stdenv.mkDerivation rec { # problems on Hydra enableParallelBuilding = false; - configureFlags = [ "--enable-readline" "--enable-dl" ]; + configureFlags = + [ "--enable-readline" + "--enable-dl" + "--with-blas=openblas" + "--with-lapack=openblas" + ] + ++ stdenv.lib.optional openblas.blas64 "--enable-64"; # Keep a copy of the octave tests detailed results in the output # derivation, because someone may care diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9f95e32e9511..69c46414c9e3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4820,6 +4820,7 @@ let glpk = null; suitesparse = null; jdk = null; + openblas = openblasCompat; }; octaveFull = (lowPrio (callPackage ../development/interpreters/octave { fltk = fltk13.override { cfg.xftSupport = true; };