diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index fa4ed2b3b68b..562703e49ece 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1093,6 +1093,13 @@ githubId = 1078000; name = "Alejandro Sánchez Medina"; }; + alejo7797 = { + email = "alex@epelde.net"; + matrix = "@alex:epelde.net"; + github = "alejo7797"; + githubId = 17302493; + name = "Alex Epelde"; + }; aleksana = { email = "me@aleksana.moe"; github = "Aleksanaa"; diff --git a/pkgs/development/python-modules/cypari/default.nix b/pkgs/development/python-modules/cypari/default.nix index da8e988829ad..7bba34e3a9a8 100644 --- a/pkgs/development/python-modules/cypari/default.nix +++ b/pkgs/development/python-modules/cypari/default.nix @@ -3,29 +3,14 @@ python, buildPythonPackage, fetchFromGitHub, - fetchurl, + fetchpatch, setuptools, cython, - bash, + gmp, + pari, perl, - gnum4, - texliveBasic, }: -let - pariVersion = "2.15.4"; - gmpVersion = "6.3.0"; - - pariSrc = fetchurl { - url = "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor pariVersion}/pari-${pariVersion}.tar.gz"; - hash = "sha256-w1Rb/uDG37QLd/tLurr5mdguYAabn20ovLbPAEyMXA8="; - }; - - gmpSrc = fetchurl { - url = "https://ftp.gnu.org/gnu/gmp/gmp-${gmpVersion}.tar.bz2"; - hash = "sha256-rCghGnz7YJuuLiyNYFjWbI/pZDT3QM9v4uR7AA0cIMs="; - }; -in buildPythonPackage rec { pname = "cypari"; version = "2.5.5"; @@ -38,14 +23,23 @@ buildPythonPackage rec { hash = "sha256-RJ9O1KsDHmMkTCIFUrcSUkA5ijTsxmoI939QCsCib0Y="; }; - postPatch = '' - substituteInPlace ./setup.py \ - --replace-fail "/bin/bash" "${lib.getExe bash}" - # final character is stripped from PARI error messages for some reason - substituteInPlace ./cypari/handle_error.pyx \ - --replace-fail "not a function in function call" "not a function in function cal" - ln -s ${pariSrc} ${pariSrc.name} - ln -s ${gmpSrc} ${gmpSrc.name} + patches = [ + (fetchpatch { + name = "support-aarch64-linux.patch"; + url = "https://github.com/3-manifolds/CyPari/commit/6197171b52ee4f44a4954ddd0e2e36769b189dee.patch"; + hash = "sha256-j2P7DEGD2B8q9Hh4G2mQng76fQdUpeAdFYoTD7Ui/Dk="; + }) + (fetchpatch { + name = "fix-build-with-cython-3_1.patch"; + url = "https://github.com/3-manifolds/CyPari/compare/622e112ffcf0383e2110954ff3ac3c42c006ebe1...50bcbd2b39177f5e4c5a3551a8a14f75ab05a5d6.patch"; + hash = "sha256-6ayvtHMS3YtzzklHaaLzl9d4zHJhm0lVZQZFS9ykFY4="; + }) + ]; + + preBuild = '' + mkdir libcache + ln -s ${gmp} libcache/gmp + ln -s ${pari} libcache/pari ''; build-system = [ @@ -53,20 +47,15 @@ buildPythonPackage rec { cython ]; - NIX_LDFLAGS = "-lc"; - nativeBuildInputs = [ - gnum4 perl - texliveBasic ]; pythonImportsCheck = [ "cypari" ]; checkPhase = '' runHook preCheck - rm -r cypari - ${python.interpreter} -m cypari.test + ${python.interpreter} -P -m cypari.test runHook postCheck ''; @@ -74,7 +63,10 @@ buildPythonPackage rec { description = "Sage's PARI extension, modified to stand alone"; homepage = "https://github.com/3-manifolds/CyPari"; license = lib.licenses.gpl2Plus; - maintainers = with lib.maintainers; [ noiioiu ]; + maintainers = with lib.maintainers; [ + noiioiu + alejo7797 + ]; changelog = "https://github.com/3-manifolds/CyPari/releases/tag/${src.tag}"; }; } diff --git a/pkgs/development/python-modules/fxrays/default.nix b/pkgs/development/python-modules/fxrays/default.nix index b7859e624117..8c83f4985514 100644 --- a/pkgs/development/python-modules/fxrays/default.nix +++ b/pkgs/development/python-modules/fxrays/default.nix @@ -37,6 +37,9 @@ buildPythonPackage rec { changelog = "https://github.com/3-manifolds/FXrays/releases/tag/${src.tag}"; homepage = "https://github.com/3-manifolds/FXrays"; license = lib.licenses.gpl2Plus; - maintainers = with lib.maintainers; [ noiioiu ]; + maintainers = with lib.maintainers; [ + noiioiu + alejo7797 + ]; }; } diff --git a/pkgs/development/python-modules/knot-floer-homology/default.nix b/pkgs/development/python-modules/knot-floer-homology/default.nix index b483f3146bf3..b2ed07a69094 100644 --- a/pkgs/development/python-modules/knot-floer-homology/default.nix +++ b/pkgs/development/python-modules/knot-floer-homology/default.nix @@ -37,6 +37,9 @@ buildPythonPackage rec { changelog = "https://github.com/3-manifolds/knot_floer_homology/releases/tag/${src.tag}"; homepage = "https://github.com/3-manifolds/knot_floer_homology"; license = lib.licenses.gpl2Plus; - maintainers = with lib.maintainers; [ noiioiu ]; + maintainers = with lib.maintainers; [ + noiioiu + alejo7797 + ]; }; } diff --git a/pkgs/development/python-modules/low-index/default.nix b/pkgs/development/python-modules/low-index/default.nix index 7d21f3602b02..c753e78d2ff5 100644 --- a/pkgs/development/python-modules/low-index/default.nix +++ b/pkgs/development/python-modules/low-index/default.nix @@ -33,6 +33,9 @@ buildPythonPackage rec { changelog = "https://github.com/3-manifolds/low_index/releases/tag/${src.tag}"; homepage = "https://github.com/3-manifolds/low_index"; license = lib.licenses.gpl2Plus; - maintainers = with lib.maintainers; [ noiioiu ]; + maintainers = with lib.maintainers; [ + noiioiu + alejo7797 + ]; }; } diff --git a/pkgs/development/python-modules/plink/default.nix b/pkgs/development/python-modules/plink/default.nix index 062d438058a4..63e47bf2828e 100644 --- a/pkgs/development/python-modules/plink/default.nix +++ b/pkgs/development/python-modules/plink/default.nix @@ -34,6 +34,9 @@ buildPythonPackage rec { homepage = "https://3-manifolds.github.io/PLink"; changelog = "https://github.com/3-manifolds/PLink/releases/tag/${src.tag}"; license = lib.licenses.gpl2Plus; - maintainers = with lib.maintainers; [ noiioiu ]; + maintainers = with lib.maintainers; [ + noiioiu + alejo7797 + ]; }; } diff --git a/pkgs/development/python-modules/snappy-15-knots/default.nix b/pkgs/development/python-modules/snappy-15-knots/default.nix index ec26a0bc8534..b08334eabebb 100644 --- a/pkgs/development/python-modules/snappy-15-knots/default.nix +++ b/pkgs/development/python-modules/snappy-15-knots/default.nix @@ -29,6 +29,9 @@ buildPythonPackage rec { homepage = "https://snappy.computop.org"; changelog = "https://github.com/3-manifolds/snappy_15_knots/releases/tag/${src.tag}"; license = licenses.gpl2Plus; - maintainers = with maintainers; [ noiioiu ]; + maintainers = with maintainers; [ + noiioiu + alejo7797 + ]; }; } diff --git a/pkgs/development/python-modules/snappy-manifolds/default.nix b/pkgs/development/python-modules/snappy-manifolds/default.nix index b5fb336f3b63..277924130b7f 100644 --- a/pkgs/development/python-modules/snappy-manifolds/default.nix +++ b/pkgs/development/python-modules/snappy-manifolds/default.nix @@ -26,6 +26,9 @@ buildPythonPackage rec { changelog = "https://github.com/3-manifolds/snappy_manifolds/releases/tag/${src.tag}"; homepage = "https://snappy.computop.org"; license = lib.licenses.gpl2Plus; - maintainers = with lib.maintainers; [ noiioiu ]; + maintainers = with lib.maintainers; [ + noiioiu + alejo7797 + ]; }; } diff --git a/pkgs/development/python-modules/spherogram/default.nix b/pkgs/development/python-modules/spherogram/default.nix index 0e4a3da679d5..e71af9540741 100644 --- a/pkgs/development/python-modules/spherogram/default.nix +++ b/pkgs/development/python-modules/spherogram/default.nix @@ -44,6 +44,9 @@ buildPythonPackage rec { homepage = "https://snappy.computop.org/spherogram.html"; changelog = "https://github.com/3-manifolds/Spherogram/releases/tag/${src.tag}"; license = lib.licenses.gpl2Plus; - maintainers = with lib.maintainers; [ noiioiu ]; + maintainers = with lib.maintainers; [ + noiioiu + alejo7797 + ]; }; } diff --git a/pkgs/development/python-modules/tkinter-gl/default.nix b/pkgs/development/python-modules/tkinter-gl/default.nix index 5e4902f2fe44..d10c824380ee 100644 --- a/pkgs/development/python-modules/tkinter-gl/default.nix +++ b/pkgs/development/python-modules/tkinter-gl/default.nix @@ -29,6 +29,9 @@ buildPythonPackage rec { changelog = "https://github.com/3-manifolds/tkinter_gl/releases/tag/${src.tag}"; homepage = "https://github.com/3-manifolds/tkinter_gl"; license = lib.licenses.gpl2Plus; - maintainers = with lib.maintainers; [ noiioiu ]; + maintainers = with lib.maintainers; [ + noiioiu + alejo7797 + ]; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5f5db002b880..4ccf974b19de 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3278,7 +3278,23 @@ self: super: with self; { cynthion = callPackage ../development/python-modules/cynthion { }; - cypari = callPackage ../development/python-modules/cypari { }; + cypari = callPackage ../development/python-modules/cypari { + + inherit (pkgs.pkgsStatic) gmp; + + pari = pkgs.pari.overrideAttrs rec { + version = "2.15.4"; + src = pkgs.fetchurl { + url = "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor version}/pari-${version}.tar.gz"; + hash = "sha256-w1Rb/uDG37QLd/tLurr5mdguYAabn20ovLbPAEyMXA8="; + }; + installTargets = [ + "install" + "install-lib-sta" + ]; + }; + + }; cypari2 = callPackage ../development/python-modules/cypari2 { };