Merge #35404: sage: explicitly use gfortran6

+13 -6
+13 -6
pkgs/applications/science/math/sage/default.nix
··· 21 21 , bash 22 22 , fetchurl 23 23 , perl 24 - , gfortran 24 + , gfortran6 25 25 , python 26 26 , autoreconfHook 27 27 , gettext ··· 94 94 bash # needed for the build 95 95 perl # needed for the build 96 96 python # needed for the build 97 - gfortran # needed to build giac, openblas 97 + gfortran6 # needed to build giac, openblas 98 98 autoreconfHook # needed to configure sage with prefix 99 99 gettext # needed to build the singular spkg 100 - hevea # needed to build the docs of the giac spkg 101 100 which # needed in configure of mpir 102 - # needed to build the docs of the giac spkg 103 101 texinfo # needed to build maxima 102 + ] ++ stdenv.lib.optionals(buildDocs) [ 103 + hevea # needed to build the docs of the giac spkg 104 104 (texlive.combine { inherit (texlive) 105 105 scheme-basic 106 106 collection-pstricks # needed by giac ··· 111 111 }) 112 112 ]; 113 113 114 - nativeBuildInputs = [ gfortran perl which ]; 114 + nativeBuildInputs = [ gfortran6 perl which ]; 115 115 116 116 patches = [ 117 117 # fix usages of /bin/rm ··· 153 153 cd .. 154 154 mv "$dir" "$out/sage-root" 155 155 156 + export SAGE_SPKG_INSTALL_DOCS='no' 156 157 cd "$out/sage-root" # build in target dir, since `make` is also `make install` 157 158 '' 158 159 + stdenv.lib.optionalString (buildDocs) '' 159 160 mkdir -p "$doc" 160 161 export SAGE_DOC="$doc" 161 162 export SAGE_DOCBUILD_OPTS="--no-pdf-links -k" 162 - export SAGE_SPKG_INSTALL_DOCS='no' 163 163 ''; 164 164 165 165 buildFlags = if (buildDocs) then "doc" else "build"; ··· 191 191 rm -f "$out/sage-root/config.status" 192 192 rm -f "$out/sage-root/build/make/Makefile-auto" 193 193 rm -f "$out/sage-home/.sage/gap/libgap-workspace-"* 194 + # Make sure unnessessary packages don't end up in the build closure 195 + find "$out" \ 196 + -iname 'config.log' \ 197 + -delete \ 198 + -or -iname 'Makefile' \ 199 + -delete 200 + rm -f "$out/lib/R/etc/Renviron" 194 201 # Make sure all shebangs are properly patched 195 202 bash $patchSageShebangs $out 196 203 '';