about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/eclib
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/eclib
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/eclib')
-rw-r--r--nixpkgs/pkgs/development/libraries/eclib/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/eclib/default.nix b/nixpkgs/pkgs/development/libraries/eclib/default.nix
new file mode 100644
index 000000000000..2a43cbe8ee53
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/eclib/default.nix
@@ -0,0 +1,49 @@
+{ stdenv
+, fetchFromGitHub
+, fetchpatch
+, autoreconfHook
+, pari
+, ntl
+, gmp
+# "FLINT is optional and only used for one part of sparse matrix reduction,
+# which is used in the modular symbol code but not mwrank or other elliptic
+# curve programs." -- https://github.com/JohnCremona/eclib/blob/master/README
+, withFlint ? false, flint ? null
+}:
+
+assert withFlint -> flint != null;
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  pname = "eclib";
+  version = "20180815"; # upgrade might break the sage interface
+  # sage tests to run:
+  # src/sage/interfaces/mwrank.py
+  # src/sage/libs/eclib
+  # ping @timokau for more info
+  src = fetchFromGitHub {
+    owner = "JohnCremona";
+    repo = "${pname}";
+    rev = "v${version}";
+    sha256 = "12syn83lnzx0xc4r1v3glfimbzndyilkpdmx50xrihbjz1hzczif";
+  };
+  buildInputs = [
+    pari
+    ntl
+    gmp
+  ] ++ stdenv.lib.optionals withFlint [
+    flint
+  ];
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+  doCheck = true;
+  meta = with stdenv.lib; {
+    inherit version;
+    description = ''Elliptic curve tools'';
+    homepage = https://github.com/JohnCremona/eclib;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ raskin timokau ];
+    platforms = platforms.all;
+  };
+}