Merge pull request #146711 from AndersonTorres/new-misc

pari update

authored by Anderson Torres and committed by GitHub 97f48853 e153efa3

+38 -73
+13 -17
pkgs/applications/science/math/pari/default.nix
··· 1 - { lib, stdenv 1 + { lib 2 + , stdenv 2 3 , fetchurl 3 4 , gmp 4 - , readline 5 5 , libX11 6 + , perl 7 + , readline 6 8 , tex 7 - , perl 8 9 , withThread ? true, libpthreadstubs 9 10 }: 10 11 ··· 12 13 13 14 stdenv.mkDerivation rec { 14 15 pname = "pari"; 15 - version = "2.13.1"; 16 + version = "2.13.3"; 16 17 17 18 src = fetchurl { 18 19 urls = [ ··· 20 21 # old versions are at the url below 21 22 "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz" 22 23 ]; 23 - sha256 = "sha256-gez31wzNquIwFlz/Ynyc4uwpe48i+fQHQiedhfht/LE="; 24 + hash = "sha256-zLp/FgbGhU8UQ2N7tXrQlY1Bx/R1P4roRZ8dZMJnoco="; 24 25 }; 25 26 26 - patches = [ 27 - # rebased version of 3edb98db78, see 28 - # https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2284 29 - ./rnfdisc.patch 30 - ]; 31 - 32 27 buildInputs = [ 33 28 gmp 34 - readline 35 29 libX11 36 - tex 37 30 perl 31 + readline 32 + tex 38 33 ] ++ lib.optionals withThread [ 39 34 libpthreadstubs 40 35 ]; 41 36 42 37 configureScript = "./Configure"; 43 38 configureFlags = [ 44 - "--with-gmp=${gmp.dev}" 45 - "--with-readline=${readline.dev}" 46 - ] ++ lib.optional stdenv.isDarwin "--host=x86_64-darwin" 39 + "--with-gmp=${lib.getDev gmp}" 40 + "--with-readline=${lib.getDev readline}" 41 + ] 42 + ++ lib.optional stdenv.isDarwin "--host=x86_64-darwin" 47 43 ++ lib.optional withThread "--mt=pthread"; 48 44 49 45 preConfigure = '' ··· 57 53 makeFlags = [ "all" ]; 58 54 59 55 meta = with lib; { 56 + homepage = "http://pari.math.u-bordeaux.fr"; 60 57 description = "Computer algebra system for high-performance number theory computations"; 61 58 longDescription = '' 62 59 PARI/GP is a widely used computer algebra system designed for fast ··· 81 78 3 or 4 times faster.) gp2c currently only understands a subset of the 82 79 GP language. 83 80 ''; 84 - homepage = "http://pari.math.u-bordeaux.fr"; 85 81 downloadPage = "http://pari.math.u-bordeaux.fr/download.html"; 86 82 license = licenses.gpl2Plus; 87 83 maintainers = with maintainers; [ ertes AndersonTorres ] ++ teams.sage.members;
+11 -5
pkgs/applications/science/math/pari/gp2c.nix
··· 1 - { lib, stdenv 2 - , pari 1 + { lib 2 + , stdenv 3 3 , fetchurl 4 - , perl }: 4 + , pari 5 + , perl 6 + }: 5 7 6 8 stdenv.mkDerivation rec { 7 9 pname = "gp2c"; ··· 12 14 sha256 = "039ip7qkwwv46wrcdrz7y12m30kazzkjr44kqbc0h137g4wzd7zf"; 13 15 }; 14 16 15 - buildInputs = [ pari perl ]; 17 + buildInputs = [ 18 + pari 19 + perl 20 + ]; 16 21 17 22 configureFlags = [ 18 23 "--with-paricfg=${pari}/lib/pari/pari.cfg" 19 - "--with-perl=${perl}/bin/perl" ]; 24 + "--with-perl=${perl}/bin/perl" 25 + ]; 20 26 21 27 meta = with lib; { 22 28 description = "A compiler to translate GP scripts to PARI programs";
-51
pkgs/applications/science/math/pari/rnfdisc.patch
··· 1 - commit 0d8a3ac970291c62b56104172418b3f2ca30927c 2 - Author: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> 3 - Date: Sun Mar 28 13:27:24 2021 +0200 4 - 5 - rnfdisc_factored: remove spurious Q_primpart [#2284] 6 - 7 - diff --git a/src/basemath/base2.c b/src/basemath/base2.c 8 - index 7e7d0db9d..c461826f4 100644 9 - --- a/src/basemath/base2.c 10 - +++ b/src/basemath/base2.c 11 - @@ -3582,7 +3582,7 @@ rnfdisc_factored(GEN nf, GEN pol, GEN *pd) 12 - 13 - nf = checknf(nf); 14 - pol = rnfdisc_get_T(nf, pol, &lim); 15 - - disc = nf_to_scalar_or_basis(nf, nfX_disc(nf, Q_primpart(pol))); 16 - + disc = nf_to_scalar_or_basis(nf, nfX_disc(nf, pol)); 17 - pol = nfX_to_monic(nf, pol, NULL); 18 - fa = idealfactor_partial(nf, disc, lim); 19 - P = gel(fa,1); l = lg(P); 20 - diff --git a/src/test/32/rnf b/src/test/32/rnf 21 - index 1e743f415..c016dce00 100644 22 - --- a/src/test/32/rnf 23 - +++ b/src/test/32/rnf 24 - @@ -853,9 +853,10 @@ error("inconsistent dimensions in idealtwoelt.") 25 - 0 26 - 0 27 - 1 28 - -[[7361, 3786, 318, 5823; 0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1], [-3, 6, -2, 0] 29 - -~] 30 - -[2, -1] 31 - +[[433, 322, 318, 1318/17; 0, 1, 0, 12/17; 0, 0, 1, 5/17; 0, 0, 0, 1/17], [25 32 - +/17, -12/17, 12/17, 16/17]~] 33 - +[1, -1] 34 - +[[12, 0, 0, 0; 0, 12, 4, 0; 0, 0, 4, 0; 0, 0, 0, 4], [6, 5, -1, 2]~] 35 - *** at top-level: rnfdedekind(nf,P,pr2,1) 36 - *** ^----------------------- 37 - *** rnfdedekind: sorry, Dedekind in the difficult case is not yet implemented. 38 - diff --git a/src/test/in/rnf b/src/test/in/rnf 39 - index 7851ae291..318d5349e 100644 40 - --- a/src/test/in/rnf 41 - +++ b/src/test/in/rnf 42 - @@ -212,6 +212,9 @@ k = nfinit(y^4 + 10*y^2 + 17); 43 - rnfdisc(k, x^2 - x + 1/Mod(y,k.pol)) 44 - rnfdisc(k, x^2 - x + 1/2) 45 - 46 - +k = nfinit(y^4 - 10*y^2 + 1); 47 - +rnfdisc(k,x^2-(y^3/2+y^2-5*y/2+1)) 48 - + 49 - \\ ERRORS, keep at end of file 50 - rnfdedekind(nf, P, pr2, 1) 51 - rnfdedekind(nf, P)
+14
pkgs/applications/science/math/sage/sage-src.nix
··· 23 23 # branches (wip patches from tickets), but exports each commit as a separate 24 24 # patch, so merge commits can lead to conflicts. Used if squashed == false. 25 25 # 26 + # The above is the preferred option. To use it, find a Trac ticket and pass the 27 + # "Commit" field from the ticket as "rev", choosing "base" as an appropriate 28 + # release tag, i.e. a tag that doesn't cause the patch to include a lot of 29 + # unrelated changes. If there is no such tag (due to nonlinear history, for 30 + # example), there are two other options, listed below. 31 + # 26 32 # 2) From GitHub's sagemath/sage repo. This lets us use a GH feature that allows 27 33 # us to choose between a .patch file, with one patch per commit, or a .diff file, 28 34 # which squashes all commits into a single diff. This is used if squashed == ··· 117 123 name = "sympy-1.9-update.patch"; 118 124 rev = "beed4e16aff32e47d0c3b1c58cb1e2f4c38590f8"; 119 125 sha256 = "sha256-3eJPfWfCrCAQ5filIn7FbzjRQeO9QyTIVl/HyRuqFtE="; 126 + }) 127 + 128 + # https://trac.sagemath.org/ticket/32797 129 + (fetchSageDiff { 130 + base = "9.5.beta7"; 131 + name = "pari-2.13.3-update.patch"; 132 + rev = "f5f7a86908daf60b25e66e6a189c51ada7e0a732"; 133 + sha256 = "sha256-H/caGx3q4KcdsyGe+ojV9bUTQ5y0siqM+QHgDbeEnbw="; 120 134 }) 121 135 ]; 122 136