2018-04-22 23:37:04 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, 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;
|
|
|
|
|
2016-10-10 19:53:05 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "eclib";
|
2019-04-02 17:39:20 +02:00
|
|
|
version = "20190226"; # upgrade might break the sage interface
|
2018-07-15 11:20:19 +02:00
|
|
|
# sage tests to run:
|
|
|
|
# src/sage/interfaces/mwrank.py
|
|
|
|
# src/sage/libs/eclib
|
|
|
|
# ping @timokau for more info
|
2016-10-10 19:53:05 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "JohnCremona";
|
2019-09-09 01:38:31 +02:00
|
|
|
repo = pname;
|
2018-04-22 23:37:04 +02:00
|
|
|
rev = "v${version}";
|
2019-04-02 17:39:20 +02:00
|
|
|
sha256 = "1910np1xzyjzszay24xn4b81qhpsvhp5aix9vdpknplni2mq8kwb";
|
2016-10-10 19:53:05 +02:00
|
|
|
};
|
2018-04-22 23:37:04 +02:00
|
|
|
buildInputs = [
|
|
|
|
pari
|
|
|
|
ntl
|
|
|
|
gmp
|
|
|
|
] ++ stdenv.lib.optionals withFlint [
|
|
|
|
flint
|
|
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
];
|
|
|
|
doCheck = true;
|
2018-07-15 11:20:19 +02:00
|
|
|
meta = with stdenv.lib; {
|
2016-10-10 19:53:05 +02:00
|
|
|
inherit version;
|
|
|
|
description = ''Elliptic curve tools'';
|
2018-04-22 23:37:04 +02:00
|
|
|
homepage = https://github.com/JohnCremona/eclib;
|
2018-07-15 11:20:19 +02:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ raskin timokau ];
|
|
|
|
platforms = platforms.all;
|
2016-10-10 19:53:05 +02:00
|
|
|
};
|
|
|
|
}
|