From 081289609ec6a274793bd47f9e302fc3a6500c5b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 23 Sep 2022 01:31:35 +0000 Subject: [PATCH 1/3] pari: 2.13.4 -> 2.15.1 --- pkgs/applications/science/math/pari/default.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/science/math/pari/default.nix b/pkgs/applications/science/math/pari/default.nix index 0aa167216e8a..91cf4ae4f389 100644 --- a/pkgs/applications/science/math/pari/default.nix +++ b/pkgs/applications/science/math/pari/default.nix @@ -14,7 +14,7 @@ assert withThread -> libpthreadstubs != null; stdenv.mkDerivation rec { pname = "pari"; - version = "2.13.4"; + version = "2.15.1"; src = fetchurl { urls = [ @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { # old versions are at the url below "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz" ]; - hash = "sha256-vN6ezq4VkoFDgcFpfNtwY1Z7ZQQgGxvke7WJIPO84YU="; + hash = "sha256-RUGdt3xmhb7mfkLg7LeOGe9WK+eq/GN8ikGXDy6Qnj0="; }; buildInputs = [ @@ -40,17 +40,12 @@ stdenv.mkDerivation rec { "--with-gmp=${lib.getDev gmp}" "--with-readline=${lib.getDev readline}" ] - ++ lib.optional stdenv.isDarwin "--host=${stdenv.system}" ++ lib.optional withThread "--mt=pthread"; preConfigure = '' export LD=$CC ''; - postConfigure = lib.optionalString stdenv.isDarwin '' - echo 'echo ${stdenv.system}' > config/arch-osname - ''; - makeFlags = [ "all" ]; meta = with lib; { From 3b258a60a65d208d5cd38cc66e2bdd43b3564d4b Mon Sep 17 00:00:00 2001 From: Mauricio Collares Date: Thu, 17 Nov 2022 20:19:36 -0300 Subject: [PATCH 2/3] sage: import pari 2.15.1 update patch --- .../patches/pari-2.15.1-upgrade-rebased.patch | 26 +++++++++++++++++++ .../science/math/sage/sage-src.nix | 16 ++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/applications/science/math/sage/patches/pari-2.15.1-upgrade-rebased.patch diff --git a/pkgs/applications/science/math/sage/patches/pari-2.15.1-upgrade-rebased.patch b/pkgs/applications/science/math/sage/patches/pari-2.15.1-upgrade-rebased.patch new file mode 100644 index 000000000000..40bbbe23f1a3 --- /dev/null +++ b/pkgs/applications/science/math/sage/patches/pari-2.15.1-upgrade-rebased.patch @@ -0,0 +1,26 @@ +diff --git a/src/sage/geometry/polyhedron/backend_normaliz.py b/src/sage/geometry/polyhedron/backend_normaliz.py +index 86b89632a5..ca8a43b248 100644 +--- a/src/sage/geometry/polyhedron/backend_normaliz.py ++++ b/src/sage/geometry/polyhedron/backend_normaliz.py +@@ -53,7 +53,7 @@ def _number_field_elements_from_algebraics_list_of_lists_of_lists(listss, **kwds + 1.732050807568878? + sage: from sage.geometry.polyhedron.backend_normaliz import _number_field_elements_from_algebraics_list_of_lists_of_lists + sage: K, results, hom = _number_field_elements_from_algebraics_list_of_lists_of_lists([[[rt2], [1]], [[rt3]], [[1], []]]); results # optional - sage.rings.number_field +- [[[-a^3 + 3*a], [1]], [[-a^2 + 2]], [[1], []]] ++ [[[-a^3 + 3*a], [1]], [[a^2 - 2]], [[1], []]] + """ + from sage.rings.qqbar import number_field_elements_from_algebraics + numbers = [] +diff --git a/src/sage/lfunctions/pari.py b/src/sage/lfunctions/pari.py +index d2b20f1891..6c31efe239 100644 +--- a/src/sage/lfunctions/pari.py ++++ b/src/sage/lfunctions/pari.py +@@ -339,7 +339,7 @@ def lfun_eta_quotient(scalings, exponents): + 0.0374412812685155 + + sage: lfun_eta_quotient([6],[4]) +- [[Vecsmall([7]), [Vecsmall([6]), Vecsmall([4])]], 0, [0, 1], 2, 36, 1] ++ [[Vecsmall([7]), [Vecsmall([6]), Vecsmall([4]), 0]], 0, [0, 1], 2, 36, 1] + + sage: lfun_eta_quotient([2,1,4], [5,-2,-2]) + Traceback (most recent call last): diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index c0a92454ac19..cd553843d69d 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -147,6 +147,22 @@ stdenv.mkDerivation rec { sha256 = "sha256-9BhQLFB3wUhiXRQsK9L+I62lSjvTfrqMNi7QUIQvH4U="; }) + # https://trac.sagemath.org/ticket/34537 + (fetchSageDiff { + name = "pari-2.15.1-upgrade.patch"; + squashed = true; + base = "54cd6fe6de52aee5a433e0569e8c370618cb2047"; # 9.8.beta1 + rev = "1e86aa26790d84bf066eca67f98a60a8aa3d4d3a"; + sha256 = "sha256-LUgcMqrKXWb72Kxl0n6MV5unLXlQSeG8ncN41F7TRSc="; + excludes = ["build/*" + "src/sage/geometry/polyhedron/base_number_field.py" + "src/sage/geometry/polyhedron/backend_normaliz.py" + "src/sage/lfunctions/pari.py"]; + }) + # Some files were excluded from the above patch due to + # conflicts. The patch below contains rebased versions. + ./patches/pari-2.15.1-upgrade-rebased.patch + # 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 From 40fddeb8fc422a57b3f025b0bd1d1078fbe0591a Mon Sep 17 00:00:00 2001 From: Mauricio Collares Date: Mon, 28 Nov 2022 09:33:10 -0300 Subject: [PATCH 3/3] giac: mark as broken on aarch64-darwin --- pkgs/applications/science/math/giac/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/science/math/giac/default.nix b/pkgs/applications/science/math/giac/default.nix index ce5eb3626e28..df7639dc6c21 100644 --- a/pkgs/applications/science/math/giac/default.nix +++ b/pkgs/applications/science/math/giac/default.nix @@ -133,6 +133,7 @@ stdenv.mkDerivation rec { homepage = "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html"; license = licenses.gpl3Plus; platforms = platforms.linux ++ (optionals (!enableGUI) platforms.darwin); + broken = stdenv.isDarwin && stdenv.isAarch64; maintainers = [ maintainers.symphorien ]; }; }