nixpkgs/pkgs/applications/science/math/pari/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

94 lines
2.9 KiB
Nix
Raw Normal View History

2021-11-19 23:33:30 +00:00
{ lib
, stdenv
, fetchurl
2023-01-30 17:54:10 +00:00
, fetchpatch
, gmp
, libX11
, libpthreadstubs
, perl
2021-11-19 23:33:30 +00:00
, readline
, tex
, withThread ? true
}:
assert withThread -> libpthreadstubs != null;
stdenv.mkDerivation rec {
pname = "pari";
2023-02-05 09:31:08 +00:00
version = "2.15.2";
src = fetchurl {
urls = [
"https://pari.math.u-bordeaux.fr/pub/pari/unix/${pname}-${version}.tar.gz"
# old versions are at the url below
"https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz"
];
2023-02-05 09:31:08 +00:00
hash = "sha256-sEYoER7iKHZRmksc2vsy/rqjTq+iT56B9Y+NBX++4N0=";
};
2023-01-30 17:54:10 +00:00
patches = [
# https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2441
(fetchpatch {
name = "fix-find_isogenous_from_Atkin.patch";
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/pari/patches/bug2441.patch?id=9.8.rc0";
hash = "sha256-DvOUFlFDnopN+MJY6GYRPNabuoHPFch/nNn+49ygznc=";
})
];
buildInputs = [
gmp
libX11
perl
2021-11-19 23:33:30 +00:00
readline
tex
2021-01-15 13:21:58 +00:00
] ++ lib.optionals withThread [
libpthreadstubs
];
configureScript = "./Configure";
2017-10-30 08:52:29 +00:00
configureFlags = [
2021-11-19 23:33:30 +00:00
"--with-gmp=${lib.getDev gmp}"
"--with-readline=${lib.getDev readline}"
]
2021-01-15 13:21:58 +00:00
++ lib.optional withThread "--mt=pthread";
2017-10-30 08:52:29 +00:00
preConfigure = ''
export LD=$CC
'';
makeFlags = [ "all" ];
meta = with lib; {
2021-11-19 23:33:30 +00:00
homepage = "http://pari.math.u-bordeaux.fr";
description = "Computer algebra system for high-performance number theory computations";
longDescription = ''
PARI/GP is a widely used computer algebra system designed for fast
computations in number theory (factorizations, algebraic number theory,
elliptic curves...), but also contains a large number of other useful
functions to compute with mathematical entities such as matrices,
polynomials, power series, algebraic numbers etc., and a lot of
transcendental functions. PARI is also available as a C library to allow
for faster computations.
Originally developed by Henri Cohen and his co-workers (Université
Bordeaux I, France), PARI is now under the GPL and maintained by Karim
Belabas with the help of many volunteer contributors.
2017-10-30 08:52:29 +00:00
- PARI is a C library, allowing fast computations.
2020-10-10 03:13:23 +01:00
- gp is an easy-to-use interactive shell giving access to the PARI
functions.
- GP is the name of gp's scripting language.
2020-10-10 03:13:23 +01:00
- gp2c, the GP-to-C compiler, combines the best of both worlds by
compiling GP scripts to the C language and transparently loading the
resulting functions into gp. (gp2c-compiled scripts will typically run
3 or 4 times faster.) gp2c currently only understands a subset of the
GP language.
'';
downloadPage = "http://pari.math.u-bordeaux.fr/download.html";
2020-10-10 03:13:23 +01:00
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ertes ] ++ teams.sage.members;
2020-10-10 03:13:23 +01:00
platforms = platforms.linux ++ platforms.darwin;
2022-05-28 00:37:07 +01:00
mainProgram = "gp";
};
}