···1diff --git a/src/sage/env.py b/src/sage/env.py
2-index 2908f5d04f..81dfd75c0d 100644
3--- a/src/sage/env.py
4+++ b/src/sage/env.py
5-@@ -218,93 +218,12 @@ NTL_LIBDIR = var("NTL_LIBDIR")
6 SAGE_BANNER = var("SAGE_BANNER", "")
7 SAGE_IMPORTALL = var("SAGE_IMPORTALL", "yes")
8···51- if sys.platform == 'cygwin':
52- # Later down we take the first matching DLL found, so search
53- # SAGE_LOCAL first so that it takes precedence
54-- search_directories = [
55-- Path(SAGE_LOCAL) / 'bin',
56-- Path(sysconfig.get_config_var('BINDIR')),
57-- ]
58- # Note: The following is not very robust, since if there are multible
59- # versions for the same library this just selects one more or less
60- # at arbitrary. However, practically speaking, on Cygwin, there
···66- else:
67- ext = 'so'
68-
69-- search_directories = [Path(SAGE_LOCAL) / 'lib']
070- libdir = sysconfig.get_config_var('LIBDIR')
71- if libdir is not None:
72- libdir = Path(libdir)
73- search_directories.append(libdir)
74-
75- multiarchlib = sysconfig.get_config_var('MULTIARCH')
76-- if multiarchlib is not None:
77- search_directories.append(libdir / multiarchlib),
78-
79- patterns = [f'lib{libname}.{ext}']
···97+GAP_SO = var("GAP_SO", '/default')
9899 # post process
100- if ' ' in DOT_SAGE:
···1diff --git a/src/sage/env.py b/src/sage/env.py
2+index 95980cc2df..37107a30e1 100644
3--- a/src/sage/env.py
4+++ b/src/sage/env.py
5+@@ -227,93 +227,12 @@ OPENMP_CXXFLAGS = var("OPENMP_CXXFLAGS", "")
6 SAGE_BANNER = var("SAGE_BANNER", "")
7 SAGE_IMPORTALL = var("SAGE_IMPORTALL", "yes")
8···51- if sys.platform == 'cygwin':
52- # Later down we take the first matching DLL found, so search
53- # SAGE_LOCAL first so that it takes precedence
54+- if SAGE_LOCAL:
55+- search_directories.append(Path(SAGE_LOCAL) / 'bin')
56+- search_directories.append(Path(sysconfig.get_config_var('BINDIR')))
057- # Note: The following is not very robust, since if there are multible
58- # versions for the same library this just selects one more or less
59- # at arbitrary. However, practically speaking, on Cygwin, there
···65- else:
66- ext = 'so'
67-
68+- if SAGE_LOCAL:
69+- search_directories.append(Path(SAGE_LOCAL) / 'lib')
70- libdir = sysconfig.get_config_var('LIBDIR')
71- if libdir is not None:
72- libdir = Path(libdir)
73- search_directories.append(libdir)
74-
75- multiarchlib = sysconfig.get_config_var('MULTIARCH')
76+- if multiarchlib is not None:
77- search_directories.append(libdir / multiarchlib),
78-
79- patterns = [f'lib{libname}.{ext}']
···97+GAP_SO = var("GAP_SO", '/default')
9899 # post process
100+ if DOT_SAGE is not None and ' ' in DOT_SAGE:
···29 );
30in
31stdenv.mkDerivation rec {
32- version = "9.3";
33 pname = "sage-src";
3435 src = fetchFromGitHub {
36 owner = "sagemath";
37 repo = "sage";
38 rev = version;
39- sha256 = "sha256-l9DX8jcDdKA7GJ6xU+nBsmlZxrcZ9ZUAJju621ooBEo=";
40 };
4142 # Patches needed because of particularities of nix or the way this is packaged.
···77 # be empty since dependencies update all the time.
78 packageUpgradePatches = [
79 # After updating smypow to (https://trac.sagemath.org/ticket/3360) we can
80- # now set the cache dir to be withing the .sage directory. This is not
81 # strictly necessary, but keeps us from littering in the user's HOME.
82 ./patches/sympow-cache.patch
83-84- # ignore a deprecation warning for usage of `cmp` in the attrs library in the doctests
85- ./patches/ignore-cmp-deprecation.patch
86-87- # remove use of matplotlib function deprecated in 3.4
88- # https://trac.sagemath.org/ticket/31827
89- (fetchSageDiff {
90- base = "9.3";
91- name = "remove-matplotlib-deprecated-function.patch";
92- rev = "32b2bcaefddc4fa3d2aee6fa690ce1466cbb5948";
93- sha256 = "sha256-SXcUGBMOoE9HpuBzgKC3P6cUmM5MiktXbe/7dVdrfWo=";
94- })
95-96- # pari 2.13 update
97- # https://trac.sagemath.org/ticket/30801
98- #
99- # the last commit in that ticket is
100- # c78b1470fccd915e2fa93f95f2fefba6220fb1f7, but commits after
101- # 10a4531721d2700fd717e2b3a1364508ffd971c3 only deal with 32-bit
102- # and post-26635 breakage, none of which is relevant to us. since
103- # there are post-9.4.beta0 rebases after that, we just skip later
104- # commits.
105- (fetchSageDiff {
106- base = "9.3";
107- name = "pari-2.13.1.patch";
108- rev = "10a4531721d2700fd717e2b3a1364508ffd971c3";
109- sha256 = "sha256-gffWKK9CMREaNOb5zb63iZUgON4FvsPrMQNqe+5ZU9E=";
110- })
111-112- # sympy 1.8 update
113- # https://trac.sagemath.org/ticket/31647
114- (fetchSageDiff {
115- base = "9.4.beta0";
116- name = "sympy-1.8.patch";
117- rev = "fa864b36e15696450c36d54215b1e68183b29d25";
118- sha256 = "sha256-fj/9QEZlVF0fw9NpWflkTuBSKpGjCE6b96ECBgdn77o=";
119- })
120-121- # sphinx 4 update
122- # https://trac.sagemath.org/ticket/31696
123- (fetchSageDiff {
124- base = "9.4.beta3";
125- name = "sphinx-4.patch";
126- rev = "bc84af8c795b7da433d2000afc3626ee65ba28b8";
127- sha256 = "sha256-5Kvs9jarC8xRIU1rdmvIWxQLC25ehiTLJpg5skh8WNM=";
128- })
129-130- # eclib 20210625 update
131- # https://trac.sagemath.org/ticket/31443
132- (fetchSageDiff {
133- base = "9.4.beta3";
134- name = "eclib-20210625.patch";
135- rev = "789550ca04c94acfb1e803251538996a34962038";
136- sha256 = "sha256-VlyEn5hg3joG8t/GwiRfq9TzJ54AoHxLolsNQ3shc2c=";
137- })
138 ];
139140 patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;
···29 );
30in
31stdenv.mkDerivation rec {
32+ version = "9.4";
33 pname = "sage-src";
3435 src = fetchFromGitHub {
36 owner = "sagemath";
37 repo = "sage";
38 rev = version;
39+ sha256 = "sha256-jqkr4meG02KbTCMsGvyr1UbosS4ZuUJhPXU/InuS+9A=";
40 };
4142 # Patches needed because of particularities of nix or the way this is packaged.
···77 # be empty since dependencies update all the time.
78 packageUpgradePatches = [
79 # After updating smypow to (https://trac.sagemath.org/ticket/3360) we can
80+ # now set the cache dir to be within the .sage directory. This is not
81 # strictly necessary, but keeps us from littering in the user's HOME.
82 ./patches/sympow-cache.patch
000000000000000000000000000000000000000000000000000000083 ];
8485 patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;