2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2018-04-22 21:37:04 +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;
|
|
|
|
|
2016-10-10 17:53:05 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "eclib";
|
2021-02-26 00:44:54 +00:00
|
|
|
version = "20210223"; # upgrade might break the sage interface
|
2018-07-15 09:20:19 +00:00
|
|
|
# sage tests to run:
|
|
|
|
# src/sage/interfaces/mwrank.py
|
|
|
|
# src/sage/libs/eclib
|
|
|
|
# ping @timokau for more info
|
2016-10-10 17:53:05 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "JohnCremona";
|
2019-09-08 23:38:31 +00:00
|
|
|
repo = pname;
|
2018-04-22 21:37:04 +00:00
|
|
|
rev = "v${version}";
|
2021-02-26 00:44:54 +00:00
|
|
|
sha256 = "sha256-xnSw5cdg4PLa0GT/blCYDz/IG5aj+HG2NHSlyCiH9g0=";
|
2016-10-10 17:53:05 +00:00
|
|
|
};
|
2018-04-22 21:37:04 +00:00
|
|
|
buildInputs = [
|
|
|
|
pari
|
|
|
|
ntl
|
|
|
|
gmp
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals withFlint [
|
2018-04-22 21:37:04 +00:00
|
|
|
flint
|
|
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
];
|
|
|
|
doCheck = true;
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2016-10-10 17:53:05 +00:00
|
|
|
inherit version;
|
2021-01-16 04:20:42 +00:00
|
|
|
description = "Elliptic curve tools";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/JohnCremona/eclib";
|
2018-07-15 09:20:19 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-11-18 20:29:24 +00:00
|
|
|
maintainers = teams.sage.members;
|
2018-07-15 09:20:19 +00:00
|
|
|
platforms = platforms.all;
|
2016-10-10 17:53:05 +00:00
|
|
|
};
|
|
|
|
}
|