diff options
Diffstat (limited to 'pkgs/applications/science/math/sage')
8 files changed, 35 insertions, 39 deletions
diff --git a/pkgs/applications/science/math/sage/default.nix b/pkgs/applications/science/math/sage/default.nix index 765c691c95551..6624dcc36528b 100644 --- a/pkgs/applications/science/math/sage/default.nix +++ b/pkgs/applications/science/math/sage/default.nix @@ -15,7 +15,7 @@ let pkgs = pkgs.python3.pkgs.overrideScope (self: super: { # `sagelib`, i.e. all of sage except some wrappers and runtime dependencies sagelib = self.callPackage ./sagelib.nix { - inherit flint arb; + inherit flint3; inherit sage-src env-locations singular; inherit (maxima) lisp-compiler; linbox = pkgs.linbox.override { withSage = true; }; @@ -73,7 +73,7 @@ let sagelib = python3.pkgs.sagelib; sage-docbuild = python3.pkgs.sage-docbuild; inherit env-locations; - inherit python3 singular palp flint pythonEnv maxima; + inherit python3 singular palp flint3 pythonEnv maxima; pkg-config = pkgs.pkg-config; # not to confuse with pythonPackages.pkg-config }; @@ -125,9 +125,7 @@ let ignoreCollisions = true; } // { extraLibs = pythonRuntimeDeps; }; # make the libs accessible - arb = pkgs.arb.override { inherit flint; }; - - singular = pkgs.singular.override { inherit flint; }; + singular = pkgs.singular.override { inherit flint3; }; maxima = pkgs.maxima-ecl.override { lisp-compiler = pkgs.ecl.override { @@ -149,7 +147,7 @@ let # openblas instead of openblasCompat. Apparently other packages somehow use flints # blas when it is available. Alternative would be to override flint to use # openblasCompat. - flint = pkgs.flint.override { withBlas = false; }; + flint3 = pkgs.flint3.override { withBlas = false; }; # Multiple palp dimensions need to be available and sage expects them all to be # in the same folder. diff --git a/pkgs/applications/science/math/sage/env-locations.nix b/pkgs/applications/science/math/sage/env-locations.nix index 39d358a1f9a83..1ca0f471a7ee2 100644 --- a/pkgs/applications/science/math/sage/env-locations.nix +++ b/pkgs/applications/science/math/sage/env-locations.nix @@ -3,7 +3,6 @@ , pari , singular , maxima -, conway_polynomials , graphs , elliptic_curves , polytopes_db @@ -27,16 +26,13 @@ writeTextFile rec { export GPDOCDIR="${pari}/share/pari/doc" export SINGULARPATH='${singular}/share/singular' export SINGULAR_SO='${singular}/lib/libSingular.so' - export GAP_SO='${gap}/lib/libgap.so' export SINGULAR_EXECUTABLE='${singular}/bin/Singular' export MAXIMA_FAS='${maxima}/lib/maxima/${maxima.version}/binary-ecl/maxima.fas' export MAXIMA_PREFIX="${maxima}" - export CONWAY_POLYNOMIALS_DATA_DIR='${conway_polynomials}/share/conway_polynomials' export GRAPHS_DATA_DIR='${graphs}/share/graphs' export ELLCURVE_DATA_DIR='${elliptic_curves}/share/ellcurves' export POLYTOPE_DATA_DIR='${polytopes_db}/share/reflexive_polytopes' - export GAP_LIB_DIR='${gap}/lib/gap' - export GAP_SHARE_DIR='${gap}/share/gap' + export GAP_ROOT_PATHS='${gap}/lib/gap;${gap}/share/gap' export ECLDIR='${maxima.lisp-compiler}/lib/${maxima.lisp-compiler.pname}-${maxima.lisp-compiler.version}/' export COMBINATORIAL_DESIGN_DATA_DIR="${combinatorial_designs}/share/combinatorial_designs" export CREMONA_MINI_DATA_DIR="${elliptic_curves}/share/cremona" diff --git a/pkgs/applications/science/math/sage/python-modules/sage-docbuild.nix b/pkgs/applications/science/math/sage/python-modules/sage-docbuild.nix index fb8c3ec8a204e..b45998bbcb86d 100644 --- a/pkgs/applications/science/math/sage/python-modules/sage-docbuild.nix +++ b/pkgs/applications/science/math/sage/python-modules/sage-docbuild.nix @@ -4,6 +4,7 @@ , jupyter-sphinx , sphinx , sphinx-copybutton +, sphinx-inline-tabs }: buildPythonPackage rec { @@ -15,6 +16,7 @@ buildPythonPackage rec { jupyter-sphinx sphinx sphinx-copybutton + sphinx-inline-tabs ]; preBuild = '' diff --git a/pkgs/applications/science/math/sage/python-modules/sage-setup.nix b/pkgs/applications/science/math/sage/python-modules/sage-setup.nix index a96f7ccd5d4c0..e1c497678d50b 100644 --- a/pkgs/applications/science/math/sage/python-modules/sage-setup.nix +++ b/pkgs/applications/science/math/sage/python-modules/sage-setup.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , sage-src -, cython_3 +, cython , jinja2 , pkgconfig # the python module, not the pkg-config alias }: @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "sage-setup"; src = sage-src; - nativeBuildInputs = [ cython_3 ]; + nativeBuildInputs = [ cython ]; buildInputs = [ pkgconfig ]; propagatedBuildInputs = [ jinja2 ]; diff --git a/pkgs/applications/science/math/sage/sage-env.nix b/pkgs/applications/science/math/sage/sage-env.nix index 4c22470de9109..f95e08c51ff4d 100644 --- a/pkgs/applications/science/math/sage/sage-env.nix +++ b/pkgs/applications/science/math/sage/sage-env.nix @@ -39,10 +39,9 @@ , ecm , lcalc , rubiks -, flintqs , blas , lapack -, flint +, flint3 , gmp , mpfr , zlib @@ -93,7 +92,6 @@ let ecm lcalc rubiks - flintqs jdk # only needed for `jmol` which may be replaced in the future less # needed to prevent transient test errors until https://github.com/ipython/ipython/pull/11864 is resolved ] @@ -155,7 +153,7 @@ writeTextFile rec { # cython needs to find these libraries, otherwise will fail with `ld: cannot find -lflint` or similar export LDFLAGS='${ lib.concatStringsSep " " (map (pkg: "-L${pkg}/lib") [ - flint + flint3 gap glpk gmp @@ -174,7 +172,7 @@ writeTextFile rec { singular gmp.dev glpk - flint + flint3 gap mpfr.dev ]) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index a77565e4072ac..00ef5d428337d 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -10,14 +10,14 @@ # all get the same sources with the same patches applied. stdenv.mkDerivation rec { - version = "10.2"; + version = "10.3"; pname = "sage-src"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "sha256-VXnPdJhtw5Y/anecrVpevJDCyBVfnjksyuuZslNipm4="; + hash = "sha256-OHtMv8t0RrP6R8XIREU+C1vpazeQLWa75wx9Mv6BN1U="; }; # contains essential files (e.g., setup.cfg) generated by the bootstrap script. @@ -25,8 +25,8 @@ stdenv.mkDerivation rec { configure-src = fetchurl { # the hash below is the tagged commit's _parent_. it can also be found by looking for # the "configure" asset at https://github.com/sagemath/sage/releases/tag/${version} - url = "mirror://sageupstream/configure/configure-b2813506039143e6f0abe859ab67a343abf72c2e.tar.gz"; - sha256 = "sha256-a1v0XyoKI+zO6Sjm8DzEwItRHbIgRDbpj4UfwVH+/hw="; + url = "mirror://sageupstream/configure/configure-ab1a517b64b02bf15bbcb8d7c2d4d643bd5eff9b.tar.gz"; + hash = "sha256-pe9AxTM+gFSR4/eVfUzay+4bwjoubbYeDPc+avKjlaw="; }; # Patches needed because of particularities of nix or the way this is packaged. @@ -53,6 +53,13 @@ stdenv.mkDerivation rec { # algorithm soon, disable this test for now. # https://github.com/sagemath/sage/issues/34575 ./patches/disable-slow-glpk-test.patch + + # https://github.com/sagemath/sage/pull/37489, landed in 10.4.beta1 + (fetchpatch { + name = "quaternionalgebra-random-failure.patch"; + url = "https://github.com/sagemath/sage/commit/1c3f991b9d3c5778e409e5414c6cfcd456113f19.diff"; + hash = "sha256-uCXchYx26DdxTjR1k2748KCEHPnekKS2fAM7SpyhNvM="; + }) ]; # Patches needed because of package updates. We could just pin the versions of @@ -62,11 +69,11 @@ stdenv.mkDerivation rec { # should come from or be proposed to upstream. This list will probably never # be empty since dependencies update all the time. packageUpgradePatches = [ - # https://github.com/sagemath/sage/pull/37123, to land in 10.3.beta7 + # https://github.com/sagemath/sage/pull/37492 (fetchpatch { - name = "scipy-1.12-upgrade.patch"; - url = "https://github.com/sagemath/sage/commit/54eec464e9fdf18b411d9148aecb918178e95909.diff"; - sha256 = "sha256-9wyNrcSfF6mYFTIV4ev2OdD7igb0AeyZZYWSc/+JrIU="; + name = "singular-4.3.2p14-upgrade.patch"; + url = "https://github.com/sagemath/sage/commit/a0c56816b051e97da44ac0a4e4d4f6915cf7fa0f.diff"; + sha256 = "sha256-WGMmPeBoj2LUC+2qxWuaJL89QUuGt6axGvxWkpM9LYg="; }) ]; diff --git a/pkgs/applications/science/math/sage/sage-with-env.nix b/pkgs/applications/science/math/sage/sage-with-env.nix index b2c0843d3100a..88c753e89c9da 100644 --- a/pkgs/applications/science/math/sage/sage-with-env.nix +++ b/pkgs/applications/science/math/sage/sage-with-env.nix @@ -13,7 +13,6 @@ , gmp , gfan , python3 -, flintqs , eclib , ntl , ecm @@ -40,7 +39,6 @@ let gfan maxima eclib - flintqs ntl ecm ]; diff --git a/pkgs/applications/science/math/sage/sagelib.nix b/pkgs/applications/science/math/sage/sagelib.nix index 5a1f4ee473c9b..0a2bd8011b0bd 100644 --- a/pkgs/applications/science/math/sage/sagelib.nix +++ b/pkgs/applications/science/math/sage/sagelib.nix @@ -10,7 +10,6 @@ , iml , libpng , readline -, arb , blas , boost , brial @@ -18,7 +17,7 @@ , eclib , ecm , fflas-ffpack -, flint +, flint3 , gap , giac , givaro @@ -45,10 +44,11 @@ , singular , sqlite , symmetrica +, conway-polynomials , cvxopt , cypari2 , cysignals -, cython_3 +, cython , fpylll , gmpy2 , importlib-metadata @@ -92,6 +92,7 @@ buildPythonPackage rec { version = src.version; pname = "sagelib"; src = sage-src; + pyproject = true; nativeBuildInputs = [ iml @@ -112,7 +113,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ # native dependencies (TODO: determine which ones need to be propagated) - arb blas boost brial @@ -120,7 +120,7 @@ buildPythonPackage rec { eclib ecm fflas-ffpack - flint + flint3 gap giac givaro @@ -149,10 +149,11 @@ buildPythonPackage rec { symmetrica # from src/sage/setup.cfg and requirements.txt + conway-polynomials cvxopt cypari2 cysignals - cython_3 + cython fpylll gmpy2 importlib-metadata @@ -202,11 +203,7 @@ buildPythonPackage rec { mkdir -p "$SAGE_SHARE/sage/ext/notebook-ipython" mkdir -p "var/lib/sage/installed" - # version lower bounds are useful, but upper bounds are a hassle because - # Sage tests already catch any relevant API breakage. - # according to the discussion at https://trac.sagemath.org/ticket/33520, - # upper bounds will be less noisy starting from Sage 9.6. - sed -i 's/, <[^, ]*//' build/pkgs/*/install-requires.txt + sed -i "/sage-conf/d" src/{setup.cfg,pyproject.toml,requirements.txt} cd build/pkgs/sagelib/src ''; |