diff --git a/pkgs/applications/science/math/sage/patches/disable-slow-glpk-test.patch b/pkgs/applications/science/math/sage/patches/disable-slow-glpk-test.patch new file mode 100644 index 00000000000..c04463e7e99 --- /dev/null +++ b/pkgs/applications/science/math/sage/patches/disable-slow-glpk-test.patch @@ -0,0 +1,17 @@ +diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py +index 0070705f78..ac19818f1b 100644 +--- a/src/sage/graphs/generic_graph.py ++++ b/src/sage/graphs/generic_graph.py +@@ -6699,12 +6699,6 @@ class GenericGraph(GenericGraph_pyx): + sage: G = DiGraph(d6, format='dig6') + sage: G.edge_connectivity() + 5 +- sage: G.edge_disjoint_spanning_trees(5) # long time +- [Digraph on 28 vertices, +- Digraph on 28 vertices, +- Digraph on 28 vertices, +- Digraph on 28 vertices, +- Digraph on 28 vertices] + + Small cases:: + diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index e1d7d283dc2..c0a92454ac1 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -138,6 +138,22 @@ stdenv.mkDerivation rec { rev = "eb8cd42feb58963adba67599bf6e311e03424328"; sha256 = "sha256-0dKewOZe2n3PqSdxCJt18FkqwTdrD0VA5MXAMiTW8Tw="; }) + + # https://trac.sagemath.org/ticket/34701 + (fetchSageDiff { + name = "libgap-fix-gc-crashes-on-aarch64.patch"; + base = "eb8cd42feb58963adba67599bf6e311e03424328"; # TODO: update when #34391 lands + rev = "90acc7f1c13a80b8aa673469a2668feb9cd4207f"; + sha256 = "sha256-9BhQLFB3wUhiXRQsK9L+I62lSjvTfrqMNi7QUIQvH4U="; + }) + + # Sage uses mixed integer programs (MIPs) to find edge disjoint + # spanning trees. For some reason, aarch64 glpk takes much longer + # than x86_64 glpk to solve such MIPs. Since the MIP formulation + # has "numerous problems" and will be replaced by a polynomial + # algorithm soon, disable this test for now. + # https://trac.sagemath.org/ticket/34575 + ./patches/disable-slow-glpk-test.patch ]; patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;