Merge pull request #56905 from timokau/pari-fix
pari: fix off-by-one error
This commit is contained in:
commit
9b57d852af
@ -1,20 +1,37 @@
|
|||||||
{ stdenv, fetchurl
|
{ stdenv
|
||||||
, gmp, readline, libX11, tex, perl
|
, fetchurl
|
||||||
|
, fetchpatch
|
||||||
|
, gmp
|
||||||
|
, readline
|
||||||
|
, libX11
|
||||||
|
, tex
|
||||||
|
, perl
|
||||||
, withThread ? true, libpthreadstubs
|
, withThread ? true, libpthreadstubs
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert withThread -> libpthreadstubs != null;
|
assert withThread -> libpthreadstubs != null;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "pari";
|
||||||
name = "pari-${version}";
|
|
||||||
version = "2.11.1";
|
version = "2.11.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://pari.math.u-bordeaux.fr/pub/pari/unix/${name}.tar.gz";
|
url = "https://pari.math.u-bordeaux.fr/pub/pari/unix/${pname}-${version}.tar.gz";
|
||||||
sha256 = "1jfax92jpydjd02fwl30r6b8kfzqqd6sm4yx94gidyz9lqjb7a94";
|
sha256 = "1jfax92jpydjd02fwl30r6b8kfzqqd6sm4yx94gidyz9lqjb7a94";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix a off-by-one bug that can potentially lead to segfaults (accepted upstream)
|
||||||
|
# https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2117
|
||||||
|
# https://trac.sagemath.org/ticket/27335
|
||||||
|
(fetchpatch {
|
||||||
|
name = "fix-off-by-one-error.patch";
|
||||||
|
# only relevant parts of https://pari.math.u-bordeaux.fr/cgi-bin/gitweb.cgi?p=pari.git;a=patch;h=aa1ee6e0898d177e6bcf49237d82c804bc410985
|
||||||
|
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/pari/patches/red_montgomery.patch?id=bbea55c96e1f05302b3c7f593cf64492497047c5";
|
||||||
|
sha256 = "0vqkmhgv9splsdswp6zjnkj50z76rc1m6k9iy3cf9dxwqw3h3nr6";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
gmp
|
gmp
|
||||||
readline
|
readline
|
||||||
@ -70,7 +87,7 @@ stdenv.mkDerivation rec {
|
|||||||
homepage = http://pari.math.u-bordeaux.fr;
|
homepage = http://pari.math.u-bordeaux.fr;
|
||||||
downloadPage = http://pari.math.u-bordeaux.fr/download.html;
|
downloadPage = http://pari.math.u-bordeaux.fr/download.html;
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ ertes raskin AndersonTorres ];
|
maintainers = with maintainers; [ ertes raskin AndersonTorres timokau ];
|
||||||
platforms = platforms.linux ++ platforms.darwin;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
updateWalker = true;
|
updateWalker = true;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user