summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@gmail.com>2016-11-22 23:47:43 -0200
committerAndersonTorres <torres.anderson.85@gmail.com>2016-11-24 22:44:56 -0200
commitd395439a10d5e96f3ec395081c0db65291f4614d (patch)
treef548d7a74994ffc44a4b1090ea0ebfaa8660cc57 /pkgs/applications/science
parent44122e2c0ffb264e56e09d8b40595b5b30177bb1 (diff)
downloadnixlib-d395439a10d5e96f3ec395081c0db65291f4614d.tar
nixlib-d395439a10d5e96f3ec395081c0db65291f4614d.tar.gz
nixlib-d395439a10d5e96f3ec395081c0db65291f4614d.tar.bz2
nixlib-d395439a10d5e96f3ec395081c0db65291f4614d.tar.lz
nixlib-d395439a10d5e96f3ec395081c0db65291f4614d.tar.xz
nixlib-d395439a10d5e96f3ec395081c0db65291f4614d.tar.zst
nixlib-d395439a10d5e96f3ec395081c0db65291f4614d.zip
pari/gp: 2.7.6 -> 2.9.0
Adding gp2c compiler, too.
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/math/pari/default.nix42
-rw-r--r--pkgs/applications/science/math/pari/gp2c.nix28
2 files changed, 62 insertions, 8 deletions
diff --git a/pkgs/applications/science/math/pari/default.nix b/pkgs/applications/science/math/pari/default.nix
index 0cda65b32c30..27153ea9b083 100644
--- a/pkgs/applications/science/math/pari/default.nix
+++ b/pkgs/applications/science/math/pari/default.nix
@@ -1,30 +1,56 @@
-{ stdenv, fetchurl, gmp, readline }:
+{ stdenv, fetchurl
+, gmp, readline, libX11, libpthreadstubs, tex, perl }:
 
 stdenv.mkDerivation rec {
-  version = "2.7.6";
+
   name = "pari-${version}";
+  version = "2.9.0";
 
   src = fetchurl {
     url = "http://pari.math.u-bordeaux.fr/pub/pari/unix/${name}.tar.gz";
-    sha256 = "04dqi697czd8mmw8aiwzrkgbvkjassqagg6lfy3lkf1k5qi9g9rr";
+    sha256 = "0rljznrvjgy71n4hlpgx1l1yy1qx52mly68k3c05ds21mlvzg92a";
   };
 
-  buildInputs = [gmp readline];
+  buildInputs = [ gmp readline libX11 libpthreadstubs tex perl ];
 
   configureScript = "./Configure";
   configureFlags =
+    "--mt=pthread" +
     "--with-gmp=${gmp.dev} " +
     "--with-readline=${readline.dev}";
 
+  makeFlags = "all";
+
   meta = with stdenv.lib; {
     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.
+
+       - PARI is a C library, allowing fast computations.  
+       - gp is an easy-to-use interactive shell giving access to the
+          PARI functions.
+       - GP is the name of gp's scripting language.
+       - 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.
+    '';
     homepage    = "http://pari.math.u-bordeaux.fr/";
+    downloadPage = "http://pari.math.u-bordeaux.fr/download.html";
     license     = licenses.gpl2Plus;
-    maintainers = with maintainers; [ ertes raskin ];
+    maintainers = with maintainers; [ ertes raskin AndersonTorres ];
     platforms   = platforms.linux;
-
-    inherit version;
-    downloadPage = "http://pari.math.u-bordeaux.fr/download.html";
     updateWalker = true;
   };
 }
diff --git a/pkgs/applications/science/math/pari/gp2c.nix b/pkgs/applications/science/math/pari/gp2c.nix
new file mode 100644
index 000000000000..007514e65528
--- /dev/null
+++ b/pkgs/applications/science/math/pari/gp2c.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl
+, pari, perl }:
+
+stdenv.mkDerivation rec {
+
+  name = "gp2c-${version}";
+  version = "0.0.10";
+
+  src = fetchurl {
+    url = "http://pari.math.u-bordeaux.fr/pub/pari/GP2C/${name}.tar.gz";
+    sha256 = "1xhpz5p81iw261ay1kip283ggr0ir8ydz8qx3v24z8jfms1r3y70";
+  };
+
+  buildInputs = [ pari perl ];
+
+  configureFlags = [
+    "--with-paricfg=${pari}/lib/pari/pari.cfg"
+    "--with-perl=${perl}/bin/perl" ];
+
+  meta = with stdenv.lib; {
+    description =  "A compiler to translate GP scripts to PARI programs";
+    homepage    = "http://pari.math.u-bordeaux.fr/";
+    downloadPage = "http://pari.math.u-bordeaux.fr/download.html";
+    license     = licenses.gpl2Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+  };
+}
+# TODO: add it as "source file" for default package