2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2019-03-05 19:21:26 +00:00
|
|
|
, fetchurl
|
|
|
|
, gmp
|
|
|
|
, readline
|
|
|
|
, libX11
|
|
|
|
, tex
|
|
|
|
, perl
|
2018-04-23 18:46:12 +01:00
|
|
|
, withThread ? true, libpthreadstubs
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert withThread -> libpthreadstubs != null;
|
2010-12-05 19:11:21 +00:00
|
|
|
|
2013-07-19 16:20:37 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-03-05 19:21:26 +00:00
|
|
|
pname = "pari";
|
2020-10-10 03:13:23 +01:00
|
|
|
version = "2.11.4";
|
2013-07-19 16:20:37 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-12-02 19:39:28 +00:00
|
|
|
# Versions with current majorMinor values are at http://pari.math.u-bordeaux.fr/pub/pari/unix/${pname}-${version}.tar.gz
|
2021-01-15 13:21:58 +00:00
|
|
|
url = "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz";
|
2020-10-10 03:13:23 +01:00
|
|
|
sha256 = "sha256-v8iPxPc1L0hA5uNSxy8DacvqikVAOxg0piafNwmXCxw=";
|
2010-12-05 19:11:21 +00:00
|
|
|
};
|
|
|
|
|
2018-04-23 18:46:12 +01:00
|
|
|
buildInputs = [
|
|
|
|
gmp
|
|
|
|
readline
|
|
|
|
libX11
|
|
|
|
tex
|
|
|
|
perl
|
2021-01-15 13:21:58 +00:00
|
|
|
] ++ lib.optionals withThread [
|
2018-04-23 18:46:12 +01:00
|
|
|
libpthreadstubs
|
|
|
|
];
|
2013-07-19 16:20:37 +01:00
|
|
|
|
|
|
|
configureScript = "./Configure";
|
2017-10-30 08:52:29 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-gmp=${gmp.dev}"
|
|
|
|
"--with-readline=${readline.dev}"
|
2021-01-15 13:21:58 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin "--host=x86_64-darwin"
|
|
|
|
++ lib.optional withThread "--mt=pthread";
|
2010-12-05 19:11:21 +00:00
|
|
|
|
2017-10-30 08:52:29 +00:00
|
|
|
preConfigure = ''
|
|
|
|
export LD=$CC
|
|
|
|
'';
|
|
|
|
|
2021-01-15 13:21:58 +00:00
|
|
|
postConfigure = lib.optionalString stdenv.isDarwin ''
|
2017-10-30 08:52:29 +00:00
|
|
|
echo 'echo x86_64-darwin' > config/arch-osname
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [ "all" ];
|
2016-11-23 01:47:43 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2010-12-05 19:11:21 +00:00
|
|
|
description = "Computer algebra system for high-performance number theory computations";
|
2016-11-23 01:47:43 +00:00
|
|
|
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.
|
2016-11-23 01:47:43 +00:00
|
|
|
- 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.
|
2016-11-23 01:47:43 +00:00
|
|
|
'';
|
2020-10-10 03:13:23 +01:00
|
|
|
homepage = "http://pari.math.u-bordeaux.fr";
|
2020-04-01 02:11:51 +01:00
|
|
|
downloadPage = "http://pari.math.u-bordeaux.fr/download.html";
|
2020-10-10 03:13:23 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2020-11-18 20:29:24 +00:00
|
|
|
maintainers = with maintainers; [ ertes AndersonTorres ] ++ teams.sage.members;
|
2020-10-10 03:13:23 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2014-09-02 10:41:46 +01:00
|
|
|
updateWalker = true;
|
2010-12-05 19:11:21 +00:00
|
|
|
};
|
2013-07-19 16:20:37 +01:00
|
|
|
}
|