octave: build with openblas

The expression inherits integer width from OpenBLAS, so Octave will use
64-bit integers if OpenBLAS supports it. However, this feature in Octave
is experimental, so we continue to use OpenBLAS with 32-bit integers by
default. (This only applies to the integer width, the pointer width is
always the platform-native width.)

+23 -4
+22 -4
pkgs/development/interpreters/octave/default.nix
··· 1 1 { stdenv, fetchurl, gfortran, readline, ncurses, perl, flex, texinfo, qhull 2 - , libX11, graphicsmagick, pcre, liblapack, pkgconfig, mesa, fltk 3 - , fftw, fftwSinglePrec, zlib, curl, qrupdate 2 + , libX11, graphicsmagick, pcre, pkgconfig, mesa, fltk 3 + , fftw, fftwSinglePrec, zlib, curl, qrupdate, openblas 4 4 , qt ? null, qscintilla ? null, ghostscript ? null, llvm ? null, hdf5 ? null,glpk ? null 5 5 , suitesparse ? null, gnuplot ? null, jdk ? null, python ? null 6 6 }: 7 7 8 + let 9 + suitesparseOrig = suitesparse; 10 + qrupdateOrig = qrupdate; 11 + in 12 + # integer width is determined by openblas, so all dependencies must be built 13 + # with exactly the same openblas 14 + let 15 + suitesparse = 16 + if suitesparseOrig != null then suitesparseOrig.override { inherit openblas; } else null; 17 + qrupdate = if qrupdateOrig != null then qrupdateOrig.override { inherit openblas; } else null; 18 + in 19 + 8 20 stdenv.mkDerivation rec { 9 21 version = "4.0.0"; 10 22 name = "octave-${version}"; ··· 14 26 }; 15 27 16 28 buildInputs = [ gfortran readline ncurses perl flex texinfo qhull libX11 17 - graphicsmagick pcre liblapack pkgconfig mesa fltk zlib curl 29 + graphicsmagick pcre pkgconfig mesa fltk zlib curl openblas 18 30 fftw fftwSinglePrec qrupdate ] 19 31 ++ (stdenv.lib.optional (qt != null) qt) 20 32 ++ (stdenv.lib.optional (qscintilla != null) qscintilla) ··· 34 46 # problems on Hydra 35 47 enableParallelBuilding = false; 36 48 37 - configureFlags = [ "--enable-readline" "--enable-dl" ]; 49 + configureFlags = 50 + [ "--enable-readline" 51 + "--enable-dl" 52 + "--with-blas=openblas" 53 + "--with-lapack=openblas" 54 + ] 55 + ++ stdenv.lib.optional openblas.blas64 "--enable-64"; 38 56 39 57 # Keep a copy of the octave tests detailed results in the output 40 58 # derivation, because someone may care
+1
pkgs/top-level/all-packages.nix
··· 4820 4820 glpk = null; 4821 4821 suitesparse = null; 4822 4822 jdk = null; 4823 + openblas = openblasCompat; 4823 4824 }; 4824 4825 octaveFull = (lowPrio (callPackage ../development/interpreters/octave { 4825 4826 fltk = fltk13.override { cfg.xftSupport = true; };