git.iko.soy/typeable/nixpkgs
on master help sign in
pari: enable darwin build
commitb93df240781617e0008e41dd8f7f735f6d7f5344 authorDaiderd Jordan <daiderd@gmail.com> dateMon 30 Oct 2017, 09:52 (9 years ago) parent9ec640e
1 file changed+18−9
pkgs/applications/science/math/pari/default.nix+18−9
pkgs/applications/science/math/pari/default.nix+18−9
@@ -14,12 +14,21 @@ stdenv.mkDerivation rec {
1414 buildInputs = [ gmp readline libX11 libpthreadstubs tex perl ];
1515
1616 configureScript = "./Configure";
17− configureFlags =
18− "--mt=pthread" +
19− "--with-gmp=${gmp.dev} " +
20− "--with-readline=${readline.dev}";
17+ configureFlags = [
18+ "--mt=pthread"
19+ "--with-gmp=${gmp.dev}"
20+ "--with-readline=${readline.dev}"
21+ ] ++ stdenv.lib.optional stdenv.isDarwin "--host=x86_64-darwin";
2122
22− makeFlags = "all";
23+ preConfigure = ''
24+ export LD=$CC
25+ '';
26+
27+ postConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
28+ echo 'echo x86_64-darwin' > config/arch-osname
29+ '';
30+
31+ makeFlags = [ "all" ];
2332
2433 meta = with stdenv.lib; {
2534 description = "Computer algebra system for high-performance number theory computations";
@@ -36,12 +45,12 @@ stdenv.mkDerivation rec {
3645 Bordeaux I, France), PARI is now under the GPL and maintained by Karim
3746 Belabas with the help of many volunteer contributors.
3847
39− - PARI is a C library, allowing fast computations.
48+ - PARI is a C library, allowing fast computations.
4049 - gp is an easy-to-use interactive shell giving access to the
4150 PARI functions.
4251 - GP is the name of gp's scripting language.
43− - gp2c, the GP-to-C compiler, combines the best of both worlds
44− by compiling GP scripts to the C language and transparently loading
52+ - gp2c, the GP-to-C compiler, combines the best of both worlds
53+ by compiling GP scripts to the C language and transparently loading
4554 the resulting functions into gp. (gp2c-compiled scripts will typically
4655 run 3 or 4 times faster.) gp2c currently only understands a subset
4756 of the GP language.
@@ -50,7 +59,7 @@ stdenv.mkDerivation rec {
5059 downloadPage = "http://pari.math.u-bordeaux.fr/download.html";
5160 license = licenses.gpl2Plus;
5261 maintainers = with maintainers; [ ertes raskin AndersonTorres ];
53− platforms = platforms.linux;
62+ platforms = platforms.linux ++ platforms.darwin;
5463 updateWalker = true;
5564 };
5665}