summary refs log tree commit diff
path: root/pkgs/applications/science/math
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2019-01-17 00:28:37 +0100
committerTimo Kaufmann <timokau@zoho.com>2019-01-17 20:39:02 +0100
commite379ee67c3562a32bc8a13f774502a97a6f7b5b9 (patch)
treea5af1c41b2124dda0d9309367b7b75988d52a9ab /pkgs/applications/science/math
parent29e150d85fcacb90728af7247b9e622b0ffa6772 (diff)
downloadnixpkgs-e379ee67c3562a32bc8a13f774502a97a6f7b5b9.tar
nixpkgs-e379ee67c3562a32bc8a13f774502a97a6f7b5b9.tar.gz
nixpkgs-e379ee67c3562a32bc8a13f774502a97a6f7b5b9.tar.bz2
nixpkgs-e379ee67c3562a32bc8a13f774502a97a6f7b5b9.tar.lz
nixpkgs-e379ee67c3562a32bc8a13f774502a97a6f7b5b9.tar.xz
nixpkgs-e379ee67c3562a32bc8a13f774502a97a6f7b5b9.tar.zst
nixpkgs-e379ee67c3562a32bc8a13f774502a97a6f7b5b9.zip
sage: 8.5 -> 8.6
Diffstat (limited to 'pkgs/applications/science/math')
-rw-r--r--pkgs/applications/science/math/sage/env-locations.nix4
-rw-r--r--pkgs/applications/science/math/sage/patches/dont-test-guess-gaproot.patch13
-rw-r--r--pkgs/applications/science/math/sage/sage-env.nix12
-rw-r--r--pkgs/applications/science/math/sage/sage-src.nix28
-rw-r--r--pkgs/applications/science/math/sage/sage-with-env.nix6
-rw-r--r--pkgs/applications/science/math/sage/sagelib.nix4
6 files changed, 17 insertions, 50 deletions
diff --git a/pkgs/applications/science/math/sage/env-locations.nix b/pkgs/applications/science/math/sage/env-locations.nix
index 9ec8d5cd83e..8354629cab5 100644
--- a/pkgs/applications/science/math/sage/env-locations.nix
+++ b/pkgs/applications/science/math/sage/env-locations.nix
@@ -7,7 +7,7 @@
 , graphs
 , elliptic_curves
 , polytopes_db
-, gap-libgap-compatible
+, gap
 , ecl
 , combinatorial_designs
 , jmol
@@ -35,7 +35,7 @@ writeTextFile rec {
     export GRAPHS_DATA_DIR='${graphs}/share/graphs'
     export ELLCURVE_DATA_DIR='${elliptic_curves}/share/ellcurves'
     export POLYTOPE_DATA_DIR='${polytopes_db}/share/reflexive_polytopes'
-    export GAP_ROOT_DIR='${gap-libgap-compatible}/share/gap/build-dir'
+    export GAP_ROOT_DIR='${gap}/share/gap/build-dir'
     export ECLDIR='${ecl}/lib/ecl-${ecl.version}/'
     export COMBINATORIAL_DESIGN_DATA_DIR="${combinatorial_designs}/share/combinatorial_designs"
     export CREMONA_MINI_DATA_DIR="${elliptic_curves}/share/cremona"
diff --git a/pkgs/applications/science/math/sage/patches/dont-test-guess-gaproot.patch b/pkgs/applications/science/math/sage/patches/dont-test-guess-gaproot.patch
deleted file mode 100644
index 32b877428d5..00000000000
--- a/pkgs/applications/science/math/sage/patches/dont-test-guess-gaproot.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
-index 5ff67107c1..1318df86fd 100644
---- a/src/sage/libs/gap/util.pyx
-+++ b/src/sage/libs/gap/util.pyx
-@@ -165,7 +165,7 @@ def _guess_gap_root():
-     EXAMPLES::
- 
-         sage: from sage.libs.gap.util import _guess_gap_root
--        sage: _guess_gap_root()
-+        sage: _guess_gap_root() # not tested (not necessary on nixos)
-         The gap-4.5.5.spkg (or later) seems to be not installed!
-         ...
-     """
diff --git a/pkgs/applications/science/math/sage/sage-env.nix b/pkgs/applications/science/math/sage/sage-env.nix
index d5e057d5335..8fd69f62171 100644
--- a/pkgs/applications/science/math/sage/sage-env.nix
+++ b/pkgs/applications/science/math/sage/sage-env.nix
@@ -14,8 +14,7 @@
 , python3
 , pkg-config
 , pari
-, gap-libgap-compatible
-, libgap
+, gap
 , ecl
 , maxima-ecl
 , singular
@@ -70,8 +69,7 @@ let
     binutils.bintools
     pkg-config
     pari
-    gap-libgap-compatible
-    libgap
+    gap
     ecl
     maxima-ecl
     singular
@@ -118,7 +116,7 @@ writeTextFile rec {
 
     # set dependent vars, like JUPYTER_CONFIG_DIR
     source "${sagelib.src}/src/bin/sage-env"
-    export PATH="${runtimepath}:$orig_path" # sage-env messes with PATH
+    export PATH="$RUNTIMEPATH_PREFIX:${runtimepath}:$orig_path" # sage-env messes with PATH
 
     export SAGE_LOGS="$TMPDIR/sage-logs"
     export SAGE_DOC="''${SAGE_DOC_OVERRIDE:-doc-placeholder}"
@@ -133,7 +131,7 @@ writeTextFile rec {
     export LDFLAGS='${
       lib.concatStringsSep " " (map (pkg: "-L${pkg}/lib") [
         flint
-        libgap
+        gap
         glpk
         gmp
         mpfr
@@ -153,7 +151,7 @@ writeTextFile rec {
         gmp.dev
         glpk
         flint
-        libgap
+        gap
         pynac
         mpfr.dev
       ])
diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix
index 43ab175ce14..c4760764a43 100644
--- a/pkgs/applications/science/math/sage/sage-src.nix
+++ b/pkgs/applications/science/math/sage/sage-src.nix
@@ -9,14 +9,14 @@
 # all get the same sources with the same patches applied.
 
 stdenv.mkDerivation rec {
-  version = "8.5";
+  version = "8.6";
   name = "sage-src-${version}";
 
   src = fetchFromGitHub {
     owner = "sagemath";
     repo = "sage";
     rev = version;
-    sha256 = "08mb9626phsls2phdzqxsnp2df5pn5qr72m0mm4nncby26pwn19c";
+    sha256 = "1vs3pbgbqpg0qnwr018bqsdmm7crgjp310cx8zwh7za3mv1cw5j3";
   };
 
   # Patches needed because of particularities of nix or the way this is packaged.
@@ -46,8 +46,6 @@ stdenv.mkDerivation rec {
     # tests) are also run. That is necessary to test dochtml individually. See
     # https://trac.sagemath.org/ticket/26110 for an upstream discussion.
     ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
-
-    ./patches/dont-test-guess-gaproot.patch
   ];
 
   # Patches needed because of package updates. We could just pin the versions of
@@ -60,12 +58,13 @@ stdenv.mkDerivation rec {
     # Fetch a diff between `base` and `rev` on sage's git server.
     # Used to fetch trac tickets by setting the `base` to the last release and the
     # `rev` to the last commit of the ticket.
-    fetchSageDiff = { base, rev, ...}@args: (
+    fetchSageDiff = { base, rev, name ? "sage-diff-${base}-${rev}.patch", ...}@args: (
       fetchpatch ({
-        url = "https://git.sagemath.org/sage.git/patch?id2=${base}&id=${rev}";
+        inherit name;
+        url = "https://git.sagemath.org/sage.git/rawdiff?id2=${base}&id=${rev}";
         # We don't care about sage's own build system (which builds all its dependencies).
         # Exclude build system changes to avoid conflicts.
-        excludes = [ "build/*" ];
+        excludes = [ "/build/*" ];
       } // builtins.removeAttrs args [ "rev" "base" ])
     );
   in [
@@ -82,21 +81,6 @@ stdenv.mkDerivation rec {
     # https://trac.sagemath.org/ticket/26315
     ./patches/giac-1.5.0.patch
 
-    # https://trac.sagemath.org/ticket/26326
-    # needs to be split because there is a merge commit in between
-    (fetchSageDiff {
-      name = "networkx-2.2-1.patch";
-      base = "8.4";
-      rev = "68f5ad068184745b38ba6716bf967c8c956c52c5";
-      sha256 = "112b5ywdqgyzgvql2jj5ss8la9i8rgnrzs8vigsfzg4shrcgh9p6";
-    })
-    (fetchSageDiff {
-      name = "networkx-2.2-2.patch";
-      base = "626485bbe5f33bf143d6dfba4de9c242f757f59b~1";
-      rev = "db10d327ade93711da735a599a67580524e6f7b4";
-      sha256 = "09v87id25fa5r9snfn4mv79syhc77jxfawj5aizmdpwdmpgxjk1f";
-    })
-
     # https://trac.sagemath.org/ticket/26442
     (fetchSageDiff {
       name = "cypari2-2.0.3.patch";
diff --git a/pkgs/applications/science/math/sage/sage-with-env.nix b/pkgs/applications/science/math/sage/sage-with-env.nix
index c5db392f103..18060f342a9 100644
--- a/pkgs/applications/science/math/sage/sage-with-env.nix
+++ b/pkgs/applications/science/math/sage/sage-with-env.nix
@@ -6,8 +6,7 @@
 , pkg-config
 , three
 , singular
-, libgap
-, gap-libgap-compatible
+, gap
 , giac
 , maxima-ecl
 , pari
@@ -35,8 +34,7 @@ let
     three
     pynac
     giac
-    libgap
-    gap-libgap-compatible
+    gap
     pari
     gmp
     gfan
diff --git a/pkgs/applications/science/math/sage/sagelib.nix b/pkgs/applications/science/math/sage/sagelib.nix
index 03b1ecd2c0b..a754a274509 100644
--- a/pkgs/applications/science/math/sage/sagelib.nix
+++ b/pkgs/applications/science/math/sage/sagelib.nix
@@ -20,7 +20,7 @@
 , jinja2
 , lcalc
 , lrcalc
-, libgap
+, gap
 , linbox
 , m4ri
 , m4rie
@@ -88,7 +88,7 @@ buildPythonPackage rec {
     glpk
     gsl
     lcalc
-    libgap
+    gap
     libmpc
     linbox
     lrcalc