From b860b106c548e0bcbf5475afe9e47e1d39b1c0e7 Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Fri, 18 Sep 2015 15:56:05 +0200 Subject: sage: 6.1.1 -> 6.8 --- pkgs/applications/science/math/sage/default.nix | 21 +++++++++------- pkgs/applications/science/math/sage/spkg-git.patch | 11 +++++++++ .../science/math/sage/spkg-python.patch | 11 +++++++++ .../science/math/sage/spkg-singular.patch | 28 ++++++++++++++++++++++ 4 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 pkgs/applications/science/math/sage/spkg-git.patch create mode 100644 pkgs/applications/science/math/sage/spkg-python.patch create mode 100644 pkgs/applications/science/math/sage/spkg-singular.patch (limited to 'pkgs/applications') diff --git a/pkgs/applications/science/math/sage/default.nix b/pkgs/applications/science/math/sage/default.nix index a27a93dd2c64..a19a49774404 100644 --- a/pkgs/applications/science/math/sage/default.nix +++ b/pkgs/applications/science/math/sage/default.nix @@ -1,27 +1,32 @@ { stdenv, fetchurl, m4, perl, gfortran, texLive, ffmpeg, tk -, imagemagick, liblapack +, imagemagick, liblapack, python, openssl, libpng +, which }: stdenv.mkDerivation rec { - name = "sage-6.1.1"; + name = "sage-6.8"; src = fetchurl { url = "mirror://sagemath/${name}.tar.gz"; - sha256 = "0kbzs0l9q7y34jv3f8rd1c2mrjsjkdgaw6mfdwjlpg9g4gghmq5y"; + sha256 = "102mrzzi215g1xn5zgcv501x9sghwg758jagx2jixvg1rj2jijj9"; }; - buildInputs = [ m4 perl gfortran texLive ffmpeg tk imagemagick liblapack ]; + buildInputs = [ m4 perl gfortran texLive ffmpeg tk imagemagick liblapack + python openssl libpng which]; + + patches = [ ./spkg-singular.patch ./spkg-python.patch ./spkg-git.patch ]; enableParallelBuilding = true; preConfigure = '' export SAGE_NUM_THREADS=$NIX_BUILD_CORES - sed -i 's/if ! [ -d "$HOME" ]/if [ -d "$HOME" ]/' src/bin/sage-env - '' + stdenv.lib.optionalString stdenv.isDarwin '' - sed -i "s/ld_version = try_run('ld -v')/ld_version = 'Apple'/" \ - build/pkgs/atlas/configuration.py + export SAGE_ATLAS_ARCH=fast + mkdir -p $out/sageHome + export HOME=$out/sageHome ''; + installPhase = ''DESTDIR=$out make install''; + meta = { homepage = "http://www.sagemath.org"; description = "A free open source mathematics software system"; diff --git a/pkgs/applications/science/math/sage/spkg-git.patch b/pkgs/applications/science/math/sage/spkg-git.patch new file mode 100644 index 000000000000..a3e768a7c240 --- /dev/null +++ b/pkgs/applications/science/math/sage/spkg-git.patch @@ -0,0 +1,11 @@ +--- old/build/pkgs/git/spkg-install 2015-07-26 15:34:43.000000000 +0200 ++++ new/build/pkgs/git/spkg-install 2015-09-17 08:28:03.586657451 +0200 +@@ -45,6 +45,8 @@ + fi + done + ++find . -exec sed -e 's@/usr/bin/perl@perl@g' -i '{}' ';' ++ + # We don't want to think about Fink or Macports + export NO_FINK=1 + export NO_DARWIN_PORTS=1 diff --git a/pkgs/applications/science/math/sage/spkg-python.patch b/pkgs/applications/science/math/sage/spkg-python.patch new file mode 100644 index 000000000000..4db9427e3e02 --- /dev/null +++ b/pkgs/applications/science/math/sage/spkg-python.patch @@ -0,0 +1,11 @@ +--- old/build/pkgs/python2/spkg-install 2015-07-26 15:34:43.000000000 +0200 ++++ new/build/pkgs/python2/spkg-install 2015-09-16 20:48:51.904555797 +0200 +@@ -32,7 +32,7 @@ + done + + # We are setting LDFLAGS so that we pick up Sage's readline +-LDFLAGS="-L$SAGE_LOCAL/lib $LDFLAGS" ++LDFLAGS="-L$SAGE_LOCAL/lib -lcrypt $LDFLAGS" + export LDFLAGS + + if [ "$SAGE_DEBUG" = "yes" ]; then diff --git a/pkgs/applications/science/math/sage/spkg-singular.patch b/pkgs/applications/science/math/sage/spkg-singular.patch new file mode 100644 index 000000000000..a4c29825a4c4 --- /dev/null +++ b/pkgs/applications/science/math/sage/spkg-singular.patch @@ -0,0 +1,28 @@ +--- old/build/pkgs/singular/spkg-install 2015-07-26 15:34:43.000000000 +0200 ++++ new/build/pkgs/singular/spkg-install 2015-09-15 20:42:51.716505855 +0200 +@@ -115,6 +115,11 @@ + done + } + ++nix_nuke_bin_rm() ++{ ++ find . -exec sed -e 's@/bin/rm@rm@g' -i '{}' ';' ++} ++ + remove_old_version() + { + rm -f "$SAGE_LOCAL"/bin/Singular* +@@ -306,11 +311,11 @@ + + + # Actually run all the functions defined above +-for i in choose_patches apply_patches remove_old_version config \ ++for i in choose_patches apply_patches nix_nuke_bin_rm remove_old_version config \ + build_singular build_libsingular build_factory build_libfac \ + create_singular_script install_docs ; do + echo "### Singular spkg-install: $i ###" +- cd "$SRC" && $i ++ cd "$SRC" && pwd && $i + if [ $? -ne 0 ]; then + echo >&2 "Error building Singular (error in $i)." + exit 1 -- cgit 1.4.1