2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2021-05-19 15:14:14 +01:00
|
|
|
, fetchurl
|
2018-04-22 22:37:04 +01:00
|
|
|
, 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 18:53:05 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "eclib";
|
2021-05-19 15:14:14 +01:00
|
|
|
version = "20210625"; # upgrade might break the sage interface
|
2018-07-15 10:20:19 +01:00
|
|
|
# sage tests to run:
|
|
|
|
# src/sage/interfaces/mwrank.py
|
|
|
|
# src/sage/libs/eclib
|
|
|
|
# ping @timokau for more info
|
2021-05-19 15:14:14 +01:00
|
|
|
src = fetchurl {
|
|
|
|
# all releases for this project appear on its GitHub releases page
|
|
|
|
# by definition! other distros sometimes update whenever they see
|
|
|
|
# a version bump in configure.ac or a new tag (and this might show
|
|
|
|
# up on repology). however, a version bump or a new tag may not
|
|
|
|
# represent a new release, and a new release might not be tagged.
|
|
|
|
#
|
|
|
|
# see https://github.com/JohnCremona/eclib/issues/64#issuecomment-789788561
|
|
|
|
# for upstream's explanation of the above
|
|
|
|
url = "https://github.com/JohnCremona/eclib/releases/download/${version}/eclib-${version}.tar.bz2";
|
|
|
|
sha256 = "sha256-fA3MPz/L+Q39sA8wxAYOUowlHRcgOd8VF4tpsBGI6BA=";
|
2016-10-10 18:53:05 +01:00
|
|
|
};
|
2018-04-22 22:37:04 +01:00
|
|
|
buildInputs = [
|
|
|
|
pari
|
|
|
|
ntl
|
|
|
|
gmp
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals withFlint [
|
2018-04-22 22:37:04 +01:00
|
|
|
flint
|
|
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
];
|
|
|
|
doCheck = true;
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2021-01-16 04:20:42 +00:00
|
|
|
description = "Elliptic curve tools";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/JohnCremona/eclib";
|
2018-07-15 10:20:19 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2020-11-18 20:29:24 +00:00
|
|
|
maintainers = teams.sage.members;
|
2018-07-15 10:20:19 +01:00
|
|
|
platforms = platforms.all;
|
2016-10-10 18:53:05 +01:00
|
|
|
};
|
|
|
|
}
|