octave: Support 64 bit indices arrays

Add a build argument `use64BitIdx`, and comment explaining how it
affects the build - it modifies the deps to make sure they are all
compatible with each other.

+53 -13
+53 -13
pkgs/development/interpreters/octave/default.nix
··· 23 , fftwSinglePrec 24 , zlib 25 , curl 26 - , qrupdate 27 , blas, lapack 28 - , arpack 29 , libwebp 30 , gl2ps 31 , ghostscript ? null 32 , hdf5 ? null 33 , glpk ? null 34 - , suitesparse ? null 35 , gnuplot ? null 36 # - Include support for GNU readline: 37 , enableReadline ? true ··· 56 , darwin 57 }: 58 59 - assert (!blas.isILP64) && (!lapack.isILP64); 60 - 61 - mkDerivation rec { 62 version = "6.1.0"; 63 pname = "octave"; 64 ··· 78 fltk 79 zlib 80 curl 81 - blas 82 - lapack 83 libsndfile 84 fftw 85 fftwSinglePrec 86 portaudio 87 - qrupdate 88 - arpack 89 libwebp 90 gl2ps 91 ] ··· 97 ++ stdenv.lib.optionals (ghostscript != null) [ ghostscript ] 98 ++ stdenv.lib.optionals (hdf5 != null) [ hdf5 ] 99 ++ stdenv.lib.optionals (glpk != null) [ glpk ] 100 - ++ stdenv.lib.optionals (suitesparse != null) [ suitesparse ] 101 ++ stdenv.lib.optionals (enableJava) [ jdk ] 102 ++ stdenv.lib.optionals (sundials_2 != null) [ sundials_2 ] 103 ++ stdenv.lib.optionals (gnuplot != null) [ gnuplot ] ··· 130 enableParallelBuilding = true; 131 132 # See https://savannah.gnu.org/bugs/?50339 133 - F77_INTEGER_8_FLAG = if blas.isILP64 then "-fdefault-integer-8" else ""; 134 135 configureFlags = [ 136 "--with-blas=blas" 137 "--with-lapack=lapack" 138 - (if blas.isILP64 then "--enable-64" else "--disable-64") 139 ] 140 ++ stdenv.lib.optionals stdenv.isDarwin [ "--enable-link-all-dependencies" ] 141 ++ stdenv.lib.optionals enableReadline [ "--enable-readline" ] ··· 153 passthru = { 154 inherit version; 155 sitePath = "share/octave/${version}/site"; 156 }; 157 158 meta = {
··· 23 , fftwSinglePrec 24 , zlib 25 , curl 26 , blas, lapack 27 + # These two should use the same lapack and blas as the above 28 + , qrupdate, arpack, suitesparse ? null 29 + # If set to true, the above 5 deps are overriden to use the blas and lapack 30 + # with 64 bit indexes support. If all are not compatible, the build will fail. 31 + , use64BitIdx ? false 32 , libwebp 33 , gl2ps 34 , ghostscript ? null 35 , hdf5 ? null 36 , glpk ? null 37 , gnuplot ? null 38 # - Include support for GNU readline: 39 , enableReadline ? true ··· 58 , darwin 59 }: 60 61 + let 62 + # Not always evaluated 63 + blas' = if use64BitIdx then 64 + blas.override { 65 + isILP64 = true; 66 + } 67 + else 68 + blas 69 + ; 70 + lapack' = if use64BitIdx then 71 + lapack.override { 72 + isILP64 = true; 73 + } 74 + else 75 + lapack 76 + ; 77 + qrupdate' = qrupdate.override { 78 + # If use64BitIdx is false, this override doesn't evaluate to a new 79 + # derivation, as blas and lapack are not overriden. 80 + blas = blas'; 81 + lapack = lapack'; 82 + }; 83 + arpack' = arpack.override { 84 + blas = blas'; 85 + lapack = lapack'; 86 + }; 87 + # Not always suitesparse is required at all 88 + suitesparse' = if suitesparse != null then 89 + suitesparse.override { 90 + blas = blas'; 91 + lapack = lapack'; 92 + } 93 + else 94 + null 95 + ; 96 + in mkDerivation rec { 97 version = "6.1.0"; 98 pname = "octave"; 99 ··· 113 fltk 114 zlib 115 curl 116 + blas' 117 + lapack' 118 libsndfile 119 fftw 120 fftwSinglePrec 121 portaudio 122 + qrupdate' 123 + arpack' 124 libwebp 125 gl2ps 126 ] ··· 132 ++ stdenv.lib.optionals (ghostscript != null) [ ghostscript ] 133 ++ stdenv.lib.optionals (hdf5 != null) [ hdf5 ] 134 ++ stdenv.lib.optionals (glpk != null) [ glpk ] 135 + ++ stdenv.lib.optionals (suitesparse != null) [ suitesparse' ] 136 ++ stdenv.lib.optionals (enableJava) [ jdk ] 137 ++ stdenv.lib.optionals (sundials_2 != null) [ sundials_2 ] 138 ++ stdenv.lib.optionals (gnuplot != null) [ gnuplot ] ··· 165 enableParallelBuilding = true; 166 167 # See https://savannah.gnu.org/bugs/?50339 168 + F77_INTEGER_8_FLAG = if use64BitIdx then "-fdefault-integer-8" else ""; 169 170 configureFlags = [ 171 "--with-blas=blas" 172 "--with-lapack=lapack" 173 + (if use64BitIdx then "--enable-64" else "--disable-64") 174 ] 175 ++ stdenv.lib.optionals stdenv.isDarwin [ "--enable-link-all-dependencies" ] 176 ++ stdenv.lib.optionals enableReadline [ "--enable-readline" ] ··· 188 passthru = { 189 inherit version; 190 sitePath = "share/octave/${version}/site"; 191 + blas = blas'; 192 + lapack = lapack'; 193 + qrupdate = qrupdate'; 194 + arpack = arpack'; 195 + suitesparse = suitesparse'; 196 }; 197 198 meta = {