sage: explicitly use gfortran6

The recent change from gfortran=gfortran6 to gfortran=gfortran7 broke
the build.
This commit is contained in:
Timo Kaufmann 2018-02-23 17:00:21 +01:00
parent 36b0efc12f
commit 89162cdd29

View File

@ -21,7 +21,7 @@
, bash , bash
, fetchurl , fetchurl
, perl , perl
, gfortran , gfortran6
, python , python
, autoreconfHook , autoreconfHook
, gettext , gettext
@ -94,13 +94,13 @@ stdenv.mkDerivation rec {
bash # needed for the build bash # needed for the build
perl # needed for the build perl # needed for the build
python # needed for the build python # needed for the build
gfortran # needed to build giac, openblas gfortran6 # needed to build giac, openblas
autoreconfHook # needed to configure sage with prefix autoreconfHook # needed to configure sage with prefix
gettext # needed to build the singular spkg gettext # needed to build the singular spkg
hevea # needed to build the docs of the giac spkg
which # needed in configure of mpir which # needed in configure of mpir
# needed to build the docs of the giac spkg
texinfo # needed to build maxima texinfo # needed to build maxima
] ++ stdenv.lib.optionals(buildDocs) [
hevea # needed to build the docs of the giac spkg
(texlive.combine { inherit (texlive) (texlive.combine { inherit (texlive)
scheme-basic scheme-basic
collection-pstricks # needed by giac collection-pstricks # needed by giac
@ -111,7 +111,7 @@ stdenv.mkDerivation rec {
}) })
]; ];
nativeBuildInputs = [ gfortran perl which ]; nativeBuildInputs = [ gfortran6 perl which ];
patches = [ patches = [
# fix usages of /bin/rm # fix usages of /bin/rm
@ -153,13 +153,13 @@ stdenv.mkDerivation rec {
cd .. cd ..
mv "$dir" "$out/sage-root" mv "$dir" "$out/sage-root"
export SAGE_SPKG_INSTALL_DOCS='no'
cd "$out/sage-root" # build in target dir, since `make` is also `make install` cd "$out/sage-root" # build in target dir, since `make` is also `make install`
'' ''
+ stdenv.lib.optionalString (buildDocs) '' + stdenv.lib.optionalString (buildDocs) ''
mkdir -p "$doc" mkdir -p "$doc"
export SAGE_DOC="$doc" export SAGE_DOC="$doc"
export SAGE_DOCBUILD_OPTS="--no-pdf-links -k" export SAGE_DOCBUILD_OPTS="--no-pdf-links -k"
export SAGE_SPKG_INSTALL_DOCS='no'
''; '';
buildFlags = if (buildDocs) then "doc" else "build"; buildFlags = if (buildDocs) then "doc" else "build";
@ -191,6 +191,13 @@ stdenv.mkDerivation rec {
rm -f "$out/sage-root/config.status" rm -f "$out/sage-root/config.status"
rm -f "$out/sage-root/build/make/Makefile-auto" rm -f "$out/sage-root/build/make/Makefile-auto"
rm -f "$out/sage-home/.sage/gap/libgap-workspace-"* rm -f "$out/sage-home/.sage/gap/libgap-workspace-"*
# Make sure unnessessary packages don't end up in the build closure
find "$out" \
-iname 'config.log' \
-delete \
-or -iname 'Makefile' \
-delete
rm -f "$out/lib/R/etc/Renviron"
# Make sure all shebangs are properly patched # Make sure all shebangs are properly patched
bash $patchSageShebangs $out bash $patchSageShebangs $out
''; '';