git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #117123 from collares/cypari-update

cypari2, cysignals: updates

commit82e1bfa53dfc0f3a9af48e6cfe6bdc7d36c450c7 authorTimo Kaufmann <timokau@zoho.com> dateWed 24 Mar 2021, 21:38 (6 years ago) parentfa9cd72812ffed
5 files changed+48−16
pkgs/applications/science/math/gap/default.nix+3 pkgs/applications/science/math/gap/mark-genstackfuncbags-as-noinline.patch+13 pkgs/applications/science/math/sage/sage-src.nix+16 pkgs/development/python-modules/cypari2/default.nix+14−3 pkgs/development/python-modules/cysignals/default.nix+2−13
pkgs/applications/science/math/gap/default.nix+3
@@ -101,6 +101,9 @@ stdenv.mkDerivation rec {
101101 excludes = ["tst/testinstall/stringobj.tst"];
102102 sha256 = "1mz5b4mbw2jdd1ypp5s0dy6pp0jsvwsxr2dm4kbkls20r1r192sc";
103103 })
104+
105+ # fixes aarch64 gc crashes: https://github.com/gap-system/gap/pull/3965
106+ ./mark-genstackfuncbags-as-noinline.patch
104107 ];
105108
106109 postPatch = ''
pkgs/applications/science/math/gap/mark-genstackfuncbags-as-noinline.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/src/gasman.c b/src/gasman.c
2+index 417811401..314a74190 100644
3+--- a/src/gasman.c
4++++ b/src/gasman.c
5+@@ -1861,7 +1861,7 @@ void SparcStackFuncBags( void )
6+ #endif
7+
8+
9+-void GenStackFuncBags ( void )
10++NOINLINE void GenStackFuncBags ( void )
11+ {
12+ Bag * top; /* top of stack */
13+ Bag * p; /* loop variable */
pkgs/applications/science/math/sage/sage-src.nix+16
@@ -87,6 +87,14 @@ stdenv.mkDerivation rec {
8787 rev = "2959ac792ebd6107fe87c9af1541083de5ba02d6";
8888 sha256 = "sha256-bWIpEGir9Kawak5CJegBMNcHm/CqhWmdru+emeSsvO0=";
8989 })
90+
91+ # fix intermittent errors in doctest/test.py: https://trac.sagemath.org/ticket/26912
92+ (fetchSageDiff {
93+ base = "9.3.beta8";
94+ name = "set-cysignals-crash-ndebug.patch";
95+ rev = "ca5257a5d0f32efc9f8f07e126020856270b1a18";
96+ sha256 = "sha256-KViw63xE3O0eUiOYzoxNrr4NL+csql9GPJLDJCf/EZs=";
97+ })
9098 ];
9199
92100 # Patches needed because of package updates. We could just pin the versions of
@@ -153,6 +161,14 @@ stdenv.mkDerivation rec {
153161 rev = "75c1516f0abb9e6f8c335e38e4031f6ef674ed30";
154162 sha256 = "sha256-RukkieIZcXNrju904H2oyGKdtpdE+9vNzvyjN2IBNg0=";
155163 })
164+
165+ # cypari 2.1.2 update (https://trac.sagemath.org/ticket/31029)
166+ (fetchSageDiff {
167+ base = "9.3.beta3";
168+ name = "cypari-2.1.2-update.patch";
169+ rev = "b9aadfd08e81d74ca7c229bb80eb853b592887d0";
170+ sha256 = "sha256-eKaMy7kpu+YKdL8bPStgocxBCTfc2Z/10RrGy2LENFw=";
171+ })
156172 ];
157173
158174 patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;
pkgs/development/python-modules/cypari2/default.nix+14−3
@@ -1,6 +1,7 @@
11{ lib
22, buildPythonPackage
33, python
4+, fetchpatch
45, fetchPypi
56, pari
67, gmp
@@ -11,13 +12,23 @@
1112buildPythonPackage rec {
1213 pname = "cypari2";
1314 # upgrade may break sage, please test the sage build or ping @timokau on upgrade
14− version = "2.1.1";
15+ version = "2.1.2";
1516
1617 src = fetchPypi {
1718 inherit pname version;
18− sha256 = "df1ef62e771ec36e5a456f5fc8b51bc6745b70f0efdd0c7a30c3f0b5f1fb93db";
19+ sha256 = "03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a";
1920 };
2021
22+ patches = [
23+ # patch to avoid some segfaults in sage's totallyreal.pyx test.
24+ # (https://trac.sagemath.org/ticket/27267). depends on Cython patch.
25+ (fetchpatch {
26+ name = "use-trashcan-for-gen.patch";
27+ url = "https://git.sagemath.org/sage.git/plain/build/pkgs/cypari/patches/trashcan.patch?id=b6ea17ef8e4d652de0a85047bac8d41e90b25555";
28+ sha256 = "sha256-w4kktWb9/aR9z4CjrUvAMOxEwRN2WkubaKzQttN8rU8=";
29+ })
30+ ];
31+
2132 # This differs slightly from the default python installPhase in that it pip-installs
2233 # "." instead of "*.whl".
2334 # That is because while the default install phase succeeds to build the package,
@@ -48,7 +59,7 @@ buildPythonPackage rec {
4859
4960 meta = with lib; {
5061 description = "Cython bindings for PARI";
51− license = licenses.gpl2;
62+ license = licenses.gpl2Plus;
5263 maintainers = teams.sage.members;
5364 homepage = "https://github.com/defeo/cypari2";
5465 };
pkgs/development/python-modules/cysignals/default.nix+2−13
@@ -1,5 +1,4 @@
11{ lib
2−, fetchpatch
32, fetchPypi
43, buildPythonPackage
54, cython
@@ -10,23 +9,13 @@ assert pariSupport -> pari != null;
109
1110buildPythonPackage rec {
1211 pname = "cysignals";
13− version = "1.10.2";
12+ version = "1.10.3";
1413
1514 src = fetchPypi {
1615 inherit pname version;
17− sha256 = "1ckxzch3wk5cg80mppky5jib5z4fzslny3001r5zg4ar1ixbc1w1";
16+ sha256 = "sha256-XEYGxDV3UCgxb3Jf23y4lOPK4Lb9L4YqDSlxdIRptDo=";
1817 };
1918
20− patches = [
21− # fixes intermittent crashes in Sage tests (including in interfaces/singular.py)
22− # will be included in cysignals 1.10.3: https://github.com/sagemath/cysignals/pull/127
23− (fetchpatch {
24− name = "fix-verify_exc_value.patch";
25− url = "https://github.com/sagemath/cysignals/commit/49a7eee4bba3ab8f340cf56c371fa4f5ed702dcc.patch";
26− sha256 = "sha256-Pfc5tL9VDSP6ftDoHoIb+MDi5rjYqr0PRfIajFuuYVs=";
27− })
28− ];
29−
3019 # explicit check:
3120 # build/src/cysignals/implementation.c:27:2: error: #error "cysignals must be compiled without _FORTIFY_SOURCE"
3221 hardeningDisable = [