2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2021-07-14 22:03:04 +00:00
|
|
|
, fetchurl
|
2020-04-24 23:36:52 +00: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;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "eclib";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "20240408"; # 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
|
2021-07-14 22:03:04 +00: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
|
2023-05-24 13:37:59 +00:00
|
|
|
url = "https://github.com/JohnCremona/eclib/releases/download/v${version}/eclib-${version}.tar.bz2";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-O6kI4gGd5T/LoUFEnKpvqC8DYFv4O/nagJLfU4ravnw=";
|
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; {
|
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;
|
|
|
|
};
|
|
|
|
}
|