2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
2021-12-06 16:07:01 +00:00
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "elliptic_curves";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "0.8.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sageupstream/${pname}/${pname}-${version}.tar.bz2";
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "0l7xh4abw5sb4d37r0ylr3vwb88fpx2zrvfm5ql0c7yrv5q59fjz";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
# Script that creates the sqlite database from the allcurves textfile
|
|
|
|
spkg-install = fetchurl {
|
2023-10-09 19:29:22 +00:00
|
|
|
url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/${pname}/spkg-install.py";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "116g684i6mvs11fvb6fzfsr4fn903axn31vigdyb8bgpf8l4hvc5";
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# directory layout as spkg-install.py expects
|
|
|
|
dir="$PWD"
|
|
|
|
cd ..
|
|
|
|
ln -s "$dir" "src"
|
|
|
|
|
|
|
|
# environment spkg-install.py expects
|
|
|
|
mkdir -p "$out/share"
|
|
|
|
export SAGE_SHARE="$out/share"
|
|
|
|
export PYTHONPATH=$PWD
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
${python3.interpreter} ${spkg-install}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Databases of elliptic curves";
|
|
|
|
longDescription = ''
|
|
|
|
Includes two databases:
|
|
|
|
|
|
|
|
* A small subset of the data in John Cremona's database of elliptic curves up
|
|
|
|
to conductor 10000. See http://www.warwick.ac.uk/~masgaj/ftp/data/ or
|
|
|
|
http://sage.math.washington.edu/cremona/INDEX.html
|
|
|
|
* William Stein's database of interesting curves
|
|
|
|
'';
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.all;
|
2020-11-21 19:51:51 +00:00
|
|
|
maintainers = teams.sage.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|