sage: 9.8 -> 10.0

+130 -464
+1 -1
pkgs/applications/science/math/sage/default.nix
··· 128 128 129 129 singular = pkgs.singular.override { inherit flint; }; 130 130 131 - maxima = pkgs.maxima-ecl-5_45.override { 131 + maxima = pkgs.maxima-ecl.override { 132 132 lisp-compiler = pkgs.ecl.override { 133 133 # "echo syntax error | ecl > /dev/full 2>&1" segfaults in 134 134 # ECL. We apply a patch to fix it (write_error.patch), but it
-19
pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch
··· 1 - diff --git a/src/sage/repl/configuration.py b/src/sage/repl/configuration.py 2 - index 67d7d2accf..18279581e2 100644 3 - --- a/src/sage/repl/configuration.py 4 - +++ b/src/sage/repl/configuration.py 5 - @@ -9,10 +9,11 @@ the IPython simple prompt is being used:: 6 - sage: cmd = 'print([sys.stdin.isatty(), sys.stdout.isatty()])' 7 - sage: import pexpect 8 - sage: output = pexpect.run( 9 - - ....: 'bash -c \'echo "{0}" | sage\''.format(cmd), 10 - + ....: 'bash -c \'export SAGE_BANNER=no; echo "{0}" | sage\''.format(cmd), 11 - ....: ).decode('utf-8', 'surrogateescape') 12 - - sage: 'sage: [False, True]' in output 13 - - True 14 - + sage: print(output) 15 - + sage...[False, True] 16 - + ... 17 - """ 18 - 19 - #*****************************************************************************
-87
pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch
··· 1 - diff --git a/src/sage/env.py b/src/sage/env.py 2 - index c4953cfa65..47b880f9ad 100644 3 - --- a/src/sage/env.py 4 - +++ b/src/sage/env.py 5 - @@ -244,81 +244,8 @@ os.environ['MPMATH_SAGE'] = '1' 6 - SAGE_BANNER = var("SAGE_BANNER", "") 7 - SAGE_IMPORTALL = var("SAGE_IMPORTALL", "yes") 8 - 9 - - 10 - -def _get_shared_lib_path(*libnames: str) -> Optional[str]: 11 - - """ 12 - - Return the full path to a shared library file installed in 13 - - ``$SAGE_LOCAL/lib`` or the directories associated with the 14 - - Python sysconfig. 15 - - 16 - - This can also be passed more than one library name (e.g. for cases where 17 - - some library may have multiple names depending on the platform) in which 18 - - case the first one found is returned. 19 - - 20 - - This supports most *NIX variants (in which ``lib<libname>.so`` is found 21 - - under ``$SAGE_LOCAL/lib``), macOS (same, but with the ``.dylib`` 22 - - extension), and Cygwin (under ``$SAGE_LOCAL/bin/cyg<libname>.dll``, 23 - - or ``$SAGE_LOCAL/bin/cyg<libname>-*.dll`` for versioned DLLs). 24 - - 25 - - For distributions like Debian that use a multiarch layout, we also try the 26 - - multiarch lib paths (i.e. ``/usr/lib/<arch>/``). 27 - - 28 - - This returns ``None`` if no matching library file could be found. 29 - - 30 - - EXAMPLES:: 31 - - 32 - - sage: from sage.env import _get_shared_lib_path 33 - - sage: "gap" in _get_shared_lib_path("gap") 34 - - True 35 - - sage: _get_shared_lib_path("an_absurd_lib") is None 36 - - True 37 - - 38 - - """ 39 - - 40 - - for libname in libnames: 41 - - search_directories: List[Path] = [] 42 - - patterns: List[str] = [] 43 - - if sys.platform == 'cygwin': 44 - - # Later down we take the first matching DLL found, so search 45 - - # SAGE_LOCAL first so that it takes precedence 46 - - if SAGE_LOCAL: 47 - - search_directories.append(Path(SAGE_LOCAL) / 'bin') 48 - - search_directories.append(Path(sysconfig.get_config_var('BINDIR'))) 49 - - # Note: The following is not very robust, since if there are multible 50 - - # versions for the same library this just selects one more or less 51 - - # at arbitrary. However, practically speaking, on Cygwin, there 52 - - # will only ever be one version 53 - - patterns = [f'cyg{libname}.dll', f'cyg{libname}-*.dll'] 54 - - else: 55 - - if sys.platform == 'darwin': 56 - - ext = 'dylib' 57 - - else: 58 - - ext = 'so' 59 - - 60 - - if SAGE_LOCAL: 61 - - search_directories.append(Path(SAGE_LOCAL) / 'lib') 62 - - libdir = sysconfig.get_config_var('LIBDIR') 63 - - if libdir is not None: 64 - - libdir = Path(libdir) 65 - - search_directories.append(libdir) 66 - - 67 - - multiarchlib = sysconfig.get_config_var('MULTIARCH') 68 - - if multiarchlib is not None: 69 - - search_directories.append(libdir / multiarchlib), 70 - - 71 - - patterns = [f'lib{libname}.{ext}'] 72 - - 73 - - for directory in search_directories: 74 - - for pattern in patterns: 75 - - path = next(directory.glob(pattern), None) 76 - - if path is not None: 77 - - return str(path.resolve()) 78 - - 79 - - # Just return None if no files were found 80 - - return None 81 - - 82 - # locate libgap shared object 83 - -GAP_SO = var("GAP_SO", _get_shared_lib_path("gap", "")) 84 - +GAP_SO = var("GAP_SO", '/default') 85 - 86 - # post process 87 - if DOT_SAGE is not None and ' ' in DOT_SAGE:
-19
pkgs/applications/science/math/sage/patches/fix-ecl-race.patch
··· 1 - diff --git a/src/sage/doctest/forker.py b/src/sage/doctest/forker.py 2 - index 02e18e67e7..2ebf6eb35f 100644 3 - --- a/src/sage/doctest/forker.py 4 - +++ b/src/sage/doctest/forker.py 5 - @@ -1075,6 +1075,14 @@ class SageDocTestRunner(doctest.DocTestRunner, object): 6 - sage: set(ex2.predecessors) == set([ex0,ex1]) 7 - True 8 - """ 9 - + 10 - + # Fix ECL dir race conditions by using a separate dir for each process 11 - + # (https://trac.sagemath.org/ticket/26968) 12 - + os.environ['MAXIMA_USERDIR'] = "{}/sage-maxima-{}".format( 13 - + tempfile.gettempdir(), 14 - + os.getpid() 15 - + ) 16 - + 17 - if isinstance(globs, RecordingDict): 18 - globs.start() 19 - example.sequence_number = len(self.history)
-58
pkgs/applications/science/math/sage/patches/numpy-1.24-upgrade.patch
··· 1 - diff --git a/src/sage/misc/persist.pyx b/src/sage/misc/persist.pyx 2 - index 3ac5f1cc2b..cb1f327c19 100644 3 - --- a/src/sage/misc/persist.pyx 4 - +++ b/src/sage/misc/persist.pyx 5 - @@ -157,7 +157,7 @@ def load(*filename, compress=True, verbose=True, **kwargs): 6 - ....: _ = f.write(code) 7 - sage: load(t) 8 - sage: hello 9 - - <fortran object> 10 - + <fortran ...> 11 - """ 12 - import sage.repl.load 13 - if len(filename) != 1: 14 - diff --git a/src/sage/plot/complex_plot.pyx b/src/sage/plot/complex_plot.pyx 15 - index 6f0aeab87a..b77c69b2f7 100644 16 - --- a/src/sage/plot/complex_plot.pyx 17 - +++ b/src/sage/plot/complex_plot.pyx 18 - @@ -461,6 +461,8 @@ def complex_to_rgb(z_values, contoured=False, tiled=False, 19 - rgb[i, j, 2] = b 20 - 21 - sig_off() 22 - + nan_indices = np.isnan(rgb).any(-1) # Mask for undefined points 23 - + rgb[nan_indices] = 1 # Make nan_indices white 24 - return rgb 25 - 26 - 27 - diff --git a/src/sage/plot/histogram.py b/src/sage/plot/histogram.py 28 - index 3bc2b76b58..388c2d1391 100644 29 - --- a/src/sage/plot/histogram.py 30 - +++ b/src/sage/plot/histogram.py 31 - @@ -87,13 +87,8 @@ class Histogram(GraphicPrimitive): 32 - 33 - TESTS:: 34 - 35 - - sage: h = histogram([10,3,5], normed=True)[0] 36 - - doctest:warning...: 37 - - DeprecationWarning: the 'normed' option is deprecated. Use 'density' instead. 38 - - See https://trac.sagemath.org/25260 for details. 39 - + sage: h = histogram([10,3,5], density=True)[0] 40 - sage: h.get_minmax_data() 41 - - doctest:warning ... 42 - - ...VisibleDeprecationWarning: Passing `normed=True` on non-uniform bins has always been broken, and computes neither the probability density function nor the probability mass function. The result is only correct if the bins are uniform, when density=True will produce the same result anyway. The argument will be removed in a future version of numpy. 43 - {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.476190476190..., 'ymin': 0} 44 - """ 45 - import numpy 46 - diff --git a/src/sage/repl/ipython_extension.py b/src/sage/repl/ipython_extension.py 47 - index 798671aab4..cad6a47ca8 100644 48 - --- a/src/sage/repl/ipython_extension.py 49 - +++ b/src/sage/repl/ipython_extension.py 50 - @@ -405,7 +405,7 @@ class SageMagics(Magics): 51 - ....: C END FILE FIB1.F 52 - ....: ''') 53 - sage: fib 54 - - <fortran object> 55 - + <fortran ...> 56 - sage: from numpy import array 57 - sage: a = array(range(10), dtype=float) 58 - sage: fib(a, 10)
-82
pkgs/applications/science/math/sage/patches/tachyon-renamed-focallength.patch
··· 1 - diff --git a/src/sage/interfaces/tachyon.py b/src/sage/interfaces/tachyon.py 2 - index 23671e5089..a5604a643c 100644 3 - --- a/src/sage/interfaces/tachyon.py 4 - +++ b/src/sage/interfaces/tachyon.py 5 - @@ -74,14 +74,14 @@ Camera projection modes 6 - The ``PROJECTION`` keyword must be followed by one of the supported 7 - camera projection mode identifiers ``PERSPECTIVE``, ``PERSPECTIVE_DOF``, 8 - ``ORTHOGRAPHIC``, or ``FISHEYE``. The ``FISHEYE`` projection mode 9 - -requires two extra parameters ``FOCALLENGTH`` and ``APERTURE`` which 10 - +requires two extra parameters ``FOCALDIST`` and ``APERTURE`` which 11 - precede the regular camera options. 12 - 13 - :: 14 - 15 - Camera 16 - projection perspective_dof 17 - - focallength 0.75 18 - + focaldist 0.75 19 - aperture 0.02 20 - Zoom 0.666667 21 - Aspectratio 1.000000 22 - diff --git a/src/sage/plot/plot3d/tachyon.py b/src/sage/plot/plot3d/tachyon.py 23 - index 88c8eba2d5..c4427dd484 100644 24 - --- a/src/sage/plot/plot3d/tachyon.py 25 - +++ b/src/sage/plot/plot3d/tachyon.py 26 - @@ -92,7 +92,7 @@ angle, right angle):: 27 - Finally there is the ``projection='perspective_dof'`` option. :: 28 - 29 - sage: T = Tachyon(xres=800, antialiasing=4, raydepth=10, 30 - - ....: projection='perspective_dof', focallength='1.0', aperture='.0025') 31 - + ....: projection='perspective_dof', focaldist='1.0', aperture='.0025') 32 - sage: T.light((0,5,7), 1.0, (1,1,1)) 33 - sage: T.texture('t1', opacity=1, specular=.3) 34 - sage: T.texture('t2', opacity=1, specular=.3, color=(0,0,1)) 35 - @@ -186,7 +186,7 @@ class Tachyon(WithEqualityById, SageObject): 36 - or ``'fisheye'``. 37 - - ``frustum`` - (default ''), otherwise list of four numbers. Only 38 - used with projection='fisheye'. 39 - - - ``focallength`` - (default ''), otherwise a number. Only used 40 - + - ``focaldist`` - (default ''), otherwise a number. Only used 41 - with projection='perspective_dof'. 42 - - ``aperture`` - (default ''), otherwise a number. Only used 43 - with projection='perspective_dof'. 44 - @@ -331,7 +331,7 @@ class Tachyon(WithEqualityById, SageObject): 45 - Use of the ``projection='perspective_dof'`` option. This may not be 46 - implemented correctly. :: 47 - 48 - - sage: T = Tachyon(xres=800,antialiasing=4, raydepth=10, projection='perspective_dof', focallength='1.0', aperture='.0025') 49 - + sage: T = Tachyon(xres=800,antialiasing=4, raydepth=10, projection='perspective_dof', focaldist='1.0', aperture='.0025') 50 - sage: T.light((0,5,7), 1.0, (1,1,1)) 51 - sage: T.texture('t1', opacity=1, specular=.3) 52 - sage: T.texture('t2', opacity=1, specular=.3, color=(0,0,1)) 53 - @@ -365,7 +365,7 @@ class Tachyon(WithEqualityById, SageObject): 54 - look_at=[0, 0, 0], 55 - viewdir=None, 56 - projection='PERSPECTIVE', 57 - - focallength='', 58 - + focaldist='', 59 - aperture='', 60 - frustum=''): 61 - r""" 62 - @@ -391,7 +391,7 @@ class Tachyon(WithEqualityById, SageObject): 63 - self._camera_position = (-3, 0, 0) # default value 64 - self._updir = updir 65 - self._projection = projection 66 - - self._focallength = focallength 67 - + self._focaldist = focaldist 68 - self._aperture = aperture 69 - self._frustum = frustum 70 - self._objects = [] 71 - @@ -624,9 +624,9 @@ class Tachyon(WithEqualityById, SageObject): 72 - camera_out = r""" 73 - camera 74 - projection %s""" % (tostr(self._projection)) 75 - - if self._focallength != '': 76 - + if self._focaldist != '': 77 - camera_out = camera_out + r""" 78 - - focallength %s""" % (float(self._focallength)) 79 - + focaldist %s""" % (float(self._focaldist)) 80 - if self._aperture != '': 81 - camera_out = camera_out + r""" 82 - aperture %s""" % (float(self._aperture))
+4 -2
pkgs/applications/science/math/sage/python-modules/sage-docbuild.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 3 , sage-src 4 + , jupyter-sphinx 4 5 , sphinx 5 - , jupyter-sphinx 6 + , sphinx-copybutton 6 7 }: 7 8 8 9 buildPythonPackage rec { ··· 11 12 src = sage-src; 12 13 13 14 propagatedBuildInputs = [ 15 + jupyter-sphinx 14 16 sphinx 15 - jupyter-sphinx 17 + sphinx-copybutton 16 18 ]; 17 19 18 20 preBuild = ''
+34 -122
pkgs/applications/science/math/sage/sage-src.nix
··· 8 8 # This is done because multiple derivations rely on these sources and they should 9 9 # all get the same sources with the same patches applied. 10 10 11 - let 12 - # Fetch a diff between `base` and `rev` on sage's git server. 13 - # Used to fetch trac tickets by setting the `base` to the last release and the 14 - # `rev` to the last commit of the ticket. 15 - # 16 - # We don't use sage's own build system (which builds all its 17 - # dependencies), so we exclude changes to "build/" from patches by 18 - # default to avoid conflicts. 19 - fetchSageDiff = { base, name, rev, sha256, squashed ? false, excludes ? [ "build/*" ] 20 - , ...}@args: ( 21 - fetchpatch ({ 22 - inherit name sha256 excludes; 23 - 24 - # There are three places to get changes from: 25 - # 26 - # 1) From Sage's Trac. Contains all release tags (like "9.4") and all developer 27 - # branches (wip patches from tickets), but exports each commit as a separate 28 - # patch, so merge commits can lead to conflicts. Used if squashed == false. 29 - # 30 - # The above is the preferred option. To use it, find a Trac ticket and pass the 31 - # "Commit" field from the ticket as "rev", choosing "base" as an appropriate 32 - # release tag, i.e. a tag that doesn't cause the patch to include a lot of 33 - # unrelated changes. If there is no such tag (due to nonlinear history, for 34 - # example), there are two other options, listed below. 35 - # 36 - # 2) From GitHub's sagemath/sage repo. This lets us use a GH feature that allows 37 - # us to choose between a .patch file, with one patch per commit, or a .diff file, 38 - # which squashes all commits into a single diff. This is used if squashed == 39 - # true. This repo has all release tags. However, it has no developer branches, so 40 - # this option can't be used if a change wasn't yet shipped in a (possibly beta) 41 - # release. 42 - # 43 - # 3) From GitHub's sagemath/sagetrac-mirror repo. Mirrors all developer branches, 44 - # but has no release tags. The only use case not covered by 1 or 2 is when we need 45 - # to apply a patch from an open ticket that contains merge commits. 46 - # 47 - # Item 3 could cover all use cases if the sagemath/sagetrack-mirror repo had 48 - # release tags, but it requires a sha instead of a release number in "base", which 49 - # is inconvenient. 50 - urls = if squashed 51 - then [ 52 - "https://github.com/sagemath/sage/compare/${base}...${rev}.diff" 53 - "https://github.com/sagemath/sagetrac-mirror/compare/${base}...${rev}.diff" 54 - ] 55 - else [ "https://git.sagemath.org/sage.git/patch?id2=${base}&id=${rev}" ]; 56 - } // builtins.removeAttrs args [ "rev" "base" "sha256" "squashed" "excludes" ]) 57 - ); 58 - in 59 11 stdenv.mkDerivation rec { 60 - version = "9.8"; 12 + version = "10.0"; 61 13 pname = "sage-src"; 62 14 63 15 src = fetchFromGitHub { 64 16 owner = "sagemath"; 65 17 repo = "sage"; 66 18 rev = version; 67 - sha256 = "sha256-dDbrzJXsOBARYfJz0r7n3LbaoXHnx7Acz6HBa95NV9o="; 19 + sha256 = "sha256-zN/Lo/GBCjYGemuaYpgG3laufN8te3wPjXMQ+Me9zgY="; 68 20 }; 69 21 70 22 # Patches needed because of particularities of nix or the way this is packaged. 71 23 # The goal is to upstream all of them and get rid of this list. 72 24 nixPatches = [ 73 - # Fixes a potential race condition which can lead to transient doctest failures. 74 - ./patches/fix-ecl-race.patch 75 - 76 - # Not necessary since library location is set explicitly 77 - # https://trac.sagemath.org/ticket/27660#ticket 78 - ./patches/do-not-test-find-library.patch 79 - 80 25 # Parallelize docubuild using subprocesses, fixing an isolation issue. See 81 26 # https://groups.google.com/forum/#!topic/sage-packaging/YGOm8tkADrE 82 27 ./patches/sphinx-docbuild-subprocesses.patch 28 + 29 + # After updating smypow to (https://github.com/sagemath/sage/issues/3360) 30 + # we can now set the cache dir to be within the .sage directory. This is 31 + # not strictly necessary, but keeps us from littering in the user's HOME. 32 + ./patches/sympow-cache.patch 83 33 ]; 84 34 85 35 # Since sage unfortunately does not release bugfix releases, packagers must 86 36 # fix those bugs themselves. This is for critical bugfixes, where "critical" 87 37 # == "causes (transient) doctest failures / somebody complained". 88 38 bugfixPatches = [ 89 - # To help debug the transient error in 90 - # https://trac.sagemath.org/ticket/23087 when it next occurs. 91 - ./patches/configurationpy-error-verbose.patch 39 + # Sage uses mixed integer programs (MIPs) to find edge disjoint 40 + # spanning trees. For some reason, aarch64 glpk takes much longer 41 + # than x86_64 glpk to solve such MIPs. Since the MIP formulation 42 + # has "numerous problems" and will be replaced by a polynomial 43 + # algorithm soon, disable this test for now. 44 + # https://github.com/sagemath/sage/issues/34575 45 + ./patches/disable-slow-glpk-test.patch 92 46 ]; 93 47 94 48 # Patches needed because of package updates. We could just pin the versions of ··· 98 52 # should come from or be proposed to upstream. This list will probably never 99 53 # be empty since dependencies update all the time. 100 54 packageUpgradePatches = [ 101 - # After updating smypow to (https://trac.sagemath.org/ticket/3360) we can 102 - # now set the cache dir to be within the .sage directory. This is not 103 - # strictly necessary, but keeps us from littering in the user's HOME. 104 - ./patches/sympow-cache.patch 105 - 106 - # Upstream will wait until Sage 9.7 to upgrade to linbox 1.7 because it 107 - # does not support gcc 6. We can upgrade earlier. 108 - # https://trac.sagemath.org/ticket/32959 109 - ./patches/linbox-1.7-upgrade.patch 110 - 111 - # adapted from https://trac.sagemath.org/ticket/23712#comment:22 112 - ./patches/tachyon-renamed-focallength.patch 113 - 114 - # https://trac.sagemath.org/ticket/34391 115 - (fetchSageDiff { 116 - name = "gap-4.12-upgrade.patch"; 117 - base = "9.8.beta7"; 118 - rev = "dd4a17281adcda74e11f998ef519b6bd0dafb043"; 119 - sha256 = "sha256-UQT9DO9xd5hh5RucvUkIm+rggPKu8bc1YaSI6LVYH98="; 120 - }) 121 - 122 - # https://trac.sagemath.org/ticket/34701 123 - (fetchSageDiff { 124 - name = "libgap-fix-gc-crashes-on-aarch64.patch"; 125 - base = "eb8cd42feb58963adba67599bf6e311e03424328"; # TODO: update when #34391 lands 126 - rev = "90acc7f1c13a80b8aa673469a2668feb9cd4207f"; 127 - sha256 = "sha256-9BhQLFB3wUhiXRQsK9L+I62lSjvTfrqMNi7QUIQvH4U="; 128 - }) 129 - 130 - # https://github.com/sagemath/sage/pull/35235 55 + # https://github.com/sagemath/sage/pull/35584, positively reviewed 131 56 (fetchpatch { 132 - name = "ipython-8.11-upgrade.patch"; 133 - url = "https://github.com/sagemath/sage/commit/23471e2d242c4de8789d7b1fc8b07a4b1d1e595a.diff"; 134 - sha256 = "sha256-wvH4BvDiaBv7jbOP8LvOE5Vs16Kcwz/C9jLpEMohzLQ="; 57 + name = "networkx-3.1-upgrade.patch"; 58 + url = "https://github.com/sagemath/sage/compare/10.0.rc2..e599562cf5fdfb9799a5412fac40c2f8e9f97341.diff"; 59 + sha256 = "sha256-3A90kXqNR0c7+k8xrZXAt5wqWg/VFAPNhQujwTdOyhI="; 135 60 }) 136 61 137 - # positively reviewed 62 + # https://github.com/sagemath/sage/pull/35612, positively reviewed 138 63 (fetchpatch { 139 - name = "matplotlib-3.7.0-upgrade.patch"; 140 - url = "https://github.com/sagemath/sage/pull/35177.diff"; 141 - sha256 = "sha256-YdPnMsjXBm9ZRm6a8hH8rSynkrABjLoIzqwp3F/rKAw="; 64 + name = "linbox-1.7-upgrade.patch"; 65 + url = "https://github.com/sagemath/sage/compare/10.0.rc2..9c8796c7b677e3a056348e3510331ea8b8c3c42e.diff"; 66 + sha256 = "sha256-/TpvIQZUqmbUuz6wvp3ni9oRir5LBA2FKDJcmnHI1r4="; 142 67 }) 143 68 144 - # https://github.com/sagemath/sage/pull/35336, merged in 10.0.beta8 69 + # https://github.com/sagemath/sage/pull/35619 145 70 (fetchpatch { 146 - name = "ipywidgets-8.0.5-upgrade.patch"; 147 - url = "https://github.com/sagemath/sage/commit/7ab3e3aa81d47a35d09161b965bba8ab16fd5c9e.diff"; 148 - sha256 = "sha256-WjdsPTui6uv92RerlV0mqltmLaxADvz+3aqSvxBFmfU="; 71 + name = "maxima-5.46.0-upgrade.patch"; 72 + url = "https://github.com/sagemath/sage/compare/10.0.rc3..7e86af5dae8f89868b25a6f57189bb5ca618da89.diff"; 73 + sha256 = "sha256-pxSxdJ2lyHoMUIxhlIn1nTHaddRxGvvTj9IbwFCTBFU="; 149 74 }) 150 75 151 - # https://github.com/sagemath/sage/pull/35499 76 + # https://github.com/sagemath/sage/pull/35635, positively reviewed 152 77 (fetchpatch { 153 - name = "ipywidgets-8.0.5-upgrade-part-deux.patch"; 154 - url = "https://github.com/sagemath/sage/pull/35499.diff"; 155 - sha256 = "sha256-uNCjLs9qrARTQNsq1+kTdvuV2A1M4xx5b1gWh5c55X0="; 78 + name = "sympy-1.12-upgrade.patch"; 79 + url = "https://github.com/sagemath/sage/compare/10.0.rc2..aa4193cdc8ec9fb7bd7c49696b7f914668f7913a.diff"; 80 + sha256 = "sha256-UAmYCxHvnE5p+H2DySNZTPFVm915jHtOEoG+tZz5n7I="; 156 81 }) 157 - 158 - # rebased from https://github.com/sagemath/sage/pull/34994, merged in sage 10.0.beta2 159 - ./patches/numpy-1.24-upgrade.patch 160 - 161 - # Sage uses mixed integer programs (MIPs) to find edge disjoint 162 - # spanning trees. For some reason, aarch64 glpk takes much longer 163 - # than x86_64 glpk to solve such MIPs. Since the MIP formulation 164 - # has "numerous problems" and will be replaced by a polynomial 165 - # algorithm soon, disable this test for now. 166 - # https://trac.sagemath.org/ticket/34575 167 - ./patches/disable-slow-glpk-test.patch 168 82 ]; 169 83 170 84 patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches; ··· 179 93 "s|var(\"SAGE_ROOT\".*|var(\"SAGE_ROOT\", \"$out\")|" \ 180 94 src/sage/env.py 181 95 182 - # src/doc/en/reference/spkg/conf.py expects index.rst in its directory, 183 - # a list of external packages in the sage distribution (build/pkgs) 184 - # generated by the bootstrap script (which we don't run). this is not 185 - # relevant for other distributions, so remove it. 186 - rm src/doc/en/reference/spkg/conf.py 187 - sed -i "/spkg/d" src/doc/en/reference/index.rst 96 + # docbuilding expects a spkg index generated by the doc/bootstrap script (which 97 + # we don't run) to exist. the spkg list includes nix package names, but it's not 98 + # worth the hassle of running the bootstrap script, so just create a dummy index. 99 + touch src/doc/en/reference/spkg/index.rst 188 100 189 101 # the bootstrap script also generates installation instructions for 190 102 # arch, debian, fedora, cygwin and homebrew using data from build/pkgs.
+91 -74
pkgs/applications/science/math/sage/sagelib.nix
··· 1 1 { sage-src 2 2 , env-locations 3 - , perl 3 + , python 4 4 , buildPythonPackage 5 5 , m4 6 + , perl 7 + , pkg-config 8 + , sage-setup 9 + , gd 10 + , iml 11 + , libpng 12 + , readline 6 13 , arb 7 14 , blas 8 - , lapack 15 + , boost 9 16 , brial 10 17 , cliquer 11 - , cypari2 12 - , cysignals 13 - , cython 14 - , lisp-compiler 15 18 , eclib 16 19 , ecm 20 + , fflas-ffpack 17 21 , flint 18 - , gd 22 + , gap 19 23 , giac 20 24 , givaro 21 25 , glpk 22 26 , gsl 23 - , iml 24 - , jinja2 25 - , libpng 27 + , lapack 26 28 , lcalc 29 + , libbraiding 30 + , libhomfly 31 + , libmpc 32 + , linbox 33 + , lisp-compiler 27 34 , lrcalc 28 - , gap 29 - , linbox 30 35 , m4ri 31 36 , m4rie 32 - , memory-allocator 33 - , libmpc 34 37 , mpfi 38 + , mpfr 35 39 , ntl 36 - , numpy 37 40 , pari 38 - , pkgconfig # the python module, not the pkg-config alias 39 - , pkg-config 40 41 , planarity 41 42 , ppl 42 - , primecountpy 43 - , python 43 + , rankwidth 44 44 , ratpoints 45 - , readline 46 - , rankwidth 45 + , singular 46 + , sqlite 47 47 , symmetrica 48 - , zn_poly 49 - , fflas-ffpack 50 - , boost 51 - , singular 52 - , pip 53 - , jupyter-core 54 - , sage-setup 55 - , libhomfly 56 - , libbraiding 48 + , cvxopt 49 + , cypari2 50 + , cysignals 51 + , cython 52 + , fpylll 57 53 , gmpy2 58 - , pplpy 59 - , sqlite 54 + , importlib-metadata 55 + , importlib-resources 56 + , ipykernel 57 + , ipython 58 + , ipywidgets 59 + , jinja2 60 60 , jupyter-client 61 - , ipywidgets 61 + , jupyter-core 62 + , lrcalc-python 63 + , matplotlib 64 + , memory-allocator 62 65 , mpmath 66 + , networkx 67 + , numpy 68 + , pexpect 69 + , pillow 70 + , pip 71 + , pkgconfig 72 + , pplpy 73 + , primecountpy 74 + , ptyprocess 75 + , requests 63 76 , rpy2 64 - , fpylll 65 77 , scipy 78 + , sphinx 66 79 , sympy 67 - , matplotlib 68 - , pillow 69 - , ipykernel 70 - , networkx 71 - , ptyprocess 72 - , lrcalc-python 73 - , sphinx # TODO: this is in setup.cfg, should we override it? 80 + , typing-extensions 74 81 }: 75 82 76 83 assert (!blas.isILP64) && (!lapack.isILP64); ··· 87 94 88 95 nativeBuildInputs = [ 89 96 iml 97 + lisp-compiler 98 + m4 90 99 perl 91 - jupyter-core 100 + pip # needed to query installed packages 92 101 pkg-config 93 102 sage-setup 94 - pip # needed to query installed packages 95 - lisp-compiler 96 - m4 97 103 ]; 98 104 99 105 buildInputs = [ 100 106 gd 101 - readline 102 107 iml 103 108 libpng 109 + readline 104 110 ]; 105 111 106 112 propagatedBuildInputs = [ 107 - cypari2 108 - jinja2 109 - numpy 110 - pkgconfig 113 + # native dependencies (TODO: determine which ones need to be propagated) 114 + arb 115 + blas 111 116 boost 112 - arb 113 117 brial 114 118 cliquer 115 - lisp-compiler 116 119 eclib 117 120 ecm 118 121 fflas-ffpack 119 122 flint 123 + gap 120 124 giac 121 125 givaro 122 126 glpk 123 127 gsl 128 + lapack 124 129 lcalc 125 - gap 130 + libbraiding 131 + libhomfly 126 132 libmpc 127 133 linbox 134 + lisp-compiler 128 135 lrcalc 129 136 m4ri 130 137 m4rie 131 - memory-allocator 132 138 mpfi 139 + mpfr 133 140 ntl 134 - blas 135 - lapack 136 141 pari 137 142 planarity 138 143 ppl 139 - primecountpy 140 144 rankwidth 141 145 ratpoints 142 146 singular 147 + sqlite 143 148 symmetrica 144 - zn_poly 145 - pip 146 - cython 149 + 150 + # from src/sage/setup.cfg and requirements.txt 151 + cvxopt 152 + cypari2 147 153 cysignals 148 - libhomfly 149 - libbraiding 154 + cython 155 + fpylll 150 156 gmpy2 157 + importlib-metadata 158 + importlib-resources 159 + ipykernel 160 + ipython 161 + ipywidgets 162 + jinja2 163 + jupyter-client 164 + jupyter-core 165 + lrcalc-python 166 + matplotlib 167 + memory-allocator 168 + mpmath 169 + networkx 170 + numpy 171 + pexpect 172 + pillow 173 + pip 174 + pkgconfig 151 175 pplpy 152 - sqlite 153 - mpmath 176 + primecountpy 177 + ptyprocess 178 + requests 154 179 rpy2 155 180 scipy 156 - sympy 157 - matplotlib 158 - pillow 159 - ipykernel 160 - fpylll 161 - networkx 162 - jupyter-client 163 - ipywidgets 164 - ptyprocess 165 - lrcalc-python 166 181 sphinx 182 + sympy 183 + typing-extensions 167 184 ]; 168 185 169 186 preBuild = ''