diff options
author | Timo Kaufmann <timokau@zoho.com> | 2019-08-09 15:03:40 +0200 |
---|---|---|
committer | Timo Kaufmann <timokau@zoho.com> | 2019-08-09 17:45:14 +0200 |
commit | 9ef44b34316cb47c0bda49f05c57ca2ea6c96816 (patch) | |
tree | e2666d4989a74a284e38069ce555fd37531ed7aa /pkgs/applications/science/math/sage | |
parent | 5e58c5f900e51c4dd89de8a4518c5bb13581f3c6 (diff) | |
download | nixlib-9ef44b34316cb47c0bda49f05c57ca2ea6c96816.tar nixlib-9ef44b34316cb47c0bda49f05c57ca2ea6c96816.tar.gz nixlib-9ef44b34316cb47c0bda49f05c57ca2ea6c96816.tar.bz2 nixlib-9ef44b34316cb47c0bda49f05c57ca2ea6c96816.tar.lz nixlib-9ef44b34316cb47c0bda49f05c57ca2ea6c96816.tar.xz nixlib-9ef44b34316cb47c0bda49f05c57ca2ea6c96816.tar.zst nixlib-9ef44b34316cb47c0bda49f05c57ca2ea6c96816.zip |
sage: move sympow cache to .sage
Diffstat (limited to 'pkgs/applications/science/math/sage')
-rw-r--r-- | pkgs/applications/science/math/sage/patches/sympow-cache.patch | 21 | ||||
-rw-r--r-- | pkgs/applications/science/math/sage/sage-src.nix | 5 |
2 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/sage/patches/sympow-cache.patch b/pkgs/applications/science/math/sage/patches/sympow-cache.patch new file mode 100644 index 000000000000..20020d610f80 --- /dev/null +++ b/pkgs/applications/science/math/sage/patches/sympow-cache.patch @@ -0,0 +1,21 @@ +diff --git a/src/sage/lfunctions/sympow.py b/src/sage/lfunctions/sympow.py +index 1640ac4f6a..03578be7b8 100644 +--- a/src/sage/lfunctions/sympow.py ++++ b/src/sage/lfunctions/sympow.py +@@ -50,6 +50,7 @@ from __future__ import print_function, absolute_import + + import os + ++from sage.env import DOT_SAGE + from sage.structure.sage_object import SageObject + from sage.misc.all import pager, verbose + import sage.rings.all +@@ -76,7 +77,7 @@ class Sympow(SageObject): + """ + Used to call sympow with given args + """ +- cmd = 'sympow %s'%args ++ cmd = 'env SYMPOW_CACHEDIR="%s/sympow///" sympow %s' % (DOT_SAGE, args) + v = os.popen(cmd).read().strip() + verbose(v, level=2) + return v diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 51460154c5de..04a2cde9ba99 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -100,6 +100,11 @@ stdenv.mkDerivation rec { rev = "c11d9cfa23ff9f77681a8f12742f68143eed4504"; sha256 = "0xzra7mbgqvahk9v45bjwir2mqz73hrhhy314jq5nxrb35ysdxyi"; }) + + # After updating smypow to (https://trac.sagemath.org/ticket/3360) we can + # now set the cache dir to be withing the .sage directory. This is not + # strictly necessary, but keeps us from littering in the user's HOME. + ./patches/sympow-cache.patch ]; patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches; |