Skip to content

Commit

Permalink
Merge pull request #36273 from timokau/sage-fat-binary
Browse files Browse the repository at this point in the history
sage: Make build more platform independant
  • Loading branch information
7c6f434c committed Mar 4, 2018
2 parents b84fd70 + 4f239f9 commit cf1b51a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkgs/applications/science/math/sage/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
, texinfo
, hevea
, buildDocs ? false
, optimize ? false # optimize sage to the current system (obviously impure)
}:

stdenv.mkDerivation rec {
Expand Down Expand Up @@ -139,7 +140,6 @@ stdenv.mkDerivation rec {
configureFlags = stdenv.lib.optionals(buildDocs) [ "--docdir=$(doc)" ];
preConfigure = ''
export SAGE_NUM_THREADS="$NIX_BUILD_CORES"
export SAGE_ATLAS_ARCH=fast
export HOME=/tmp/sage-home
export SAGE_ROOT="$PWD"
Expand All @@ -160,6 +160,9 @@ stdenv.mkDerivation rec {
mkdir -p "$doc"
export SAGE_DOC="$doc"
export SAGE_DOCBUILD_OPTS="--no-pdf-links -k"
''
+ stdenv.lib.optionalString (!optimize) ''
export SAGE_FAT_BINARY=yes
'';

buildFlags = if (buildDocs) then "doc" else "build";
Expand Down

0 comments on commit cf1b51a

Please sign in to comment.