lol

sage: 6.1.1 -> 6.8

authored by

Florent Becker and committed by
Florent Becker
b860b106 0be672ce

+63 -8
+13 -8
pkgs/applications/science/math/sage/default.nix
··· 1 1 { stdenv, fetchurl, m4, perl, gfortran, texLive, ffmpeg, tk 2 - , imagemagick, liblapack 2 + , imagemagick, liblapack, python, openssl, libpng 3 + , which 3 4 }: 4 5 5 6 stdenv.mkDerivation rec { 6 - name = "sage-6.1.1"; 7 + name = "sage-6.8"; 7 8 8 9 src = fetchurl { 9 10 url = "mirror://sagemath/${name}.tar.gz"; 10 - sha256 = "0kbzs0l9q7y34jv3f8rd1c2mrjsjkdgaw6mfdwjlpg9g4gghmq5y"; 11 + sha256 = "102mrzzi215g1xn5zgcv501x9sghwg758jagx2jixvg1rj2jijj9"; 11 12 }; 12 13 13 - buildInputs = [ m4 perl gfortran texLive ffmpeg tk imagemagick liblapack ]; 14 + buildInputs = [ m4 perl gfortran texLive ffmpeg tk imagemagick liblapack 15 + python openssl libpng which]; 16 + 17 + patches = [ ./spkg-singular.patch ./spkg-python.patch ./spkg-git.patch ]; 14 18 15 19 enableParallelBuilding = true; 16 20 17 21 preConfigure = '' 18 22 export SAGE_NUM_THREADS=$NIX_BUILD_CORES 19 - sed -i 's/if ! [ -d "$HOME" ]/if [ -d "$HOME" ]/' src/bin/sage-env 20 - '' + stdenv.lib.optionalString stdenv.isDarwin '' 21 - sed -i "s/ld_version = try_run('ld -v')/ld_version = 'Apple'/" \ 22 - build/pkgs/atlas/configuration.py 23 + export SAGE_ATLAS_ARCH=fast 24 + mkdir -p $out/sageHome 25 + export HOME=$out/sageHome 23 26 ''; 27 + 28 + installPhase = ''DESTDIR=$out make install''; 24 29 25 30 meta = { 26 31 homepage = "http://www.sagemath.org";
+11
pkgs/applications/science/math/sage/spkg-git.patch
··· 1 + --- old/build/pkgs/git/spkg-install 2015-07-26 15:34:43.000000000 +0200 2 + +++ new/build/pkgs/git/spkg-install 2015-09-17 08:28:03.586657451 +0200 3 + @@ -45,6 +45,8 @@ 4 + fi 5 + done 6 + 7 + +find . -exec sed -e 's@/usr/bin/perl@perl@g' -i '{}' ';' 8 + + 9 + # We don't want to think about Fink or Macports 10 + export NO_FINK=1 11 + export NO_DARWIN_PORTS=1
+11
pkgs/applications/science/math/sage/spkg-python.patch
··· 1 + --- old/build/pkgs/python2/spkg-install 2015-07-26 15:34:43.000000000 +0200 2 + +++ new/build/pkgs/python2/spkg-install 2015-09-16 20:48:51.904555797 +0200 3 + @@ -32,7 +32,7 @@ 4 + done 5 + 6 + # We are setting LDFLAGS so that we pick up Sage's readline 7 + -LDFLAGS="-L$SAGE_LOCAL/lib $LDFLAGS" 8 + +LDFLAGS="-L$SAGE_LOCAL/lib -lcrypt $LDFLAGS" 9 + export LDFLAGS 10 + 11 + if [ "$SAGE_DEBUG" = "yes" ]; then
+28
pkgs/applications/science/math/sage/spkg-singular.patch
··· 1 + --- old/build/pkgs/singular/spkg-install 2015-07-26 15:34:43.000000000 +0200 2 + +++ new/build/pkgs/singular/spkg-install 2015-09-15 20:42:51.716505855 +0200 3 + @@ -115,6 +115,11 @@ 4 + done 5 + } 6 + 7 + +nix_nuke_bin_rm() 8 + +{ 9 + + find . -exec sed -e 's@/bin/rm@rm@g' -i '{}' ';' 10 + +} 11 + + 12 + remove_old_version() 13 + { 14 + rm -f "$SAGE_LOCAL"/bin/Singular* 15 + @@ -306,11 +311,11 @@ 16 + 17 + 18 + # Actually run all the functions defined above 19 + -for i in choose_patches apply_patches remove_old_version config \ 20 + +for i in choose_patches apply_patches nix_nuke_bin_rm remove_old_version config \ 21 + build_singular build_libsingular build_factory build_libfac \ 22 + create_singular_script install_docs ; do 23 + echo "### Singular spkg-install: $i ###" 24 + - cd "$SRC" && $i 25 + + cd "$SRC" && pwd && $i 26 + if [ $? -ne 0 ]; then 27 + echo >&2 "Error building Singular (error in $i)." 28 + exit 1