2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, 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;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "eclib";
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "20190909"; # upgrade might break the sage interface
|
2020-04-24 23:36:52 +00:00
|
|
|
# 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}";
|
2021-04-26 19:14:03 +00:00
|
|
|
sha256 = "0y1vdi4120gdw56gg2dn3wh625yr9wpyk3wpbsd25w4lv83qq5da";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
buildInputs = [
|
|
|
|
pari
|
|
|
|
ntl
|
|
|
|
gmp
|
2021-02-05 17:12:51 +00:00
|
|
|
] ++ lib.optionals withFlint [
|
2020-04-24 23:36:52 +00:00
|
|
|
flint
|
|
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
];
|
|
|
|
doCheck = true;
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit version;
|
2021-01-17 00:15:33 +00:00
|
|
|
description = "Elliptic curve tools";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/JohnCremona/eclib";
|
|
|
|
license = licenses.gpl2Plus;
|
2020-11-21 19:51:51 +00:00
|
|
|
maintainers = teams.sage.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|