@@ -1,21 +1,44 @@
1−{stdenv, fetchFromGitHub, autoconf, automake, libtool, gettext, autoreconfHook
2−, pari, ntl, gmp}:
1+{ stdenv
2+, fetchFromGitHub
3+, autoreconfHook
4+, libtool
5+, gettext
6+, pari
7+, ntl
8+, gmp
9+# "FLINT is optional and only used for one part of sparse matrix reduction,
10+# which is used in the modular symbol code but not mwrank or other elliptic
11+# curve programs." -- https://github.com/JohnCremona/eclib/blob/master/README
12+, withFlint ? false, flint ? null
13+}:
14+
15+assert withFlint -> flint != null;
16+
317stdenv.mkDerivation rec {
418 name = "${pname}-${version}";
519 pname = "eclib";
6− version = "20160720";
7− # or fetchFromGitHub(owner,repo,rev) or fetchgit(rev)
20+ version = "20171002";
821 src = fetchFromGitHub {
922 owner = "JohnCremona";
1023 repo = "${pname}";
11− rev = "${version}";
12− sha256 = "0qrcd5c8cqhw9f14my6k6013w8li5vdigrjvchkr19n2l8g75j0h";
24+ rev = "v${version}";
25+ sha256 = "092an90405q9da0k0z5jfp5rng9jl0mqbvsbv4fx6jc9ykfcahsj";
1326 };
14− buildInputs = [pari ntl gmp];
15− nativeBuildInputs = [autoconf automake libtool gettext autoreconfHook];
27+ buildInputs = [
28+ pari
29+ ntl
30+ gmp
31+ ] ++ stdenv.lib.optionals withFlint [
32+ flint
33+ ];
34+ nativeBuildInputs = [
35+ autoreconfHook
36+ ];
37+ doCheck = true;
1638 meta = {
1739 inherit version;
1840 description = ''Elliptic curve tools'';
41+ homepage = https://github.com/JohnCremona/eclib;
1942 license = stdenv.lib.licenses.gpl2Plus;
2043 maintainers = [stdenv.lib.maintainers.raskin];
2144 platforms = stdenv.lib.platforms.linux;