acr-cli: init at 0.14 (#359508)
[NixPkgs.git] / pkgs / by-name / el / elliptic_curves / package.nix
blob55c03afbc4c203178b2f31e0d80a5202a847613e
1 { lib, stdenv
2 , fetchurl
3 , python3
4 }:
6 stdenv.mkDerivation rec {
7   pname = "elliptic_curves";
8   version = "0.8.1";
10   src = fetchurl {
11     url = "mirror://sageupstream/${pname}/${pname}-${version}.tar.bz2";
12     sha256 = "0l7xh4abw5sb4d37r0ylr3vwb88fpx2zrvfm5ql0c7yrv5q59fjz";
13   };
16   # Script that creates the sqlite database from the allcurves textfile
17   spkg-install = fetchurl {
18     url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/${pname}/spkg-install.py";
19     sha256 = "116g684i6mvs11fvb6fzfsr4fn903axn31vigdyb8bgpf8l4hvc5";
20   };
22   installPhase = ''
23     # directory layout as spkg-install.py expects
24     dir="$PWD"
25     cd ..
26     ln -s "$dir" "src"
28     # environment spkg-install.py expects
29     mkdir -p "$out/share"
30     export SAGE_SHARE="$out/share"
31     export PYTHONPATH=$PWD
33     ${python3.interpreter} ${spkg-install}
34   '';
36   meta = with lib; {
37     description = "Databases of elliptic curves";
38     longDescription = ''
39       Includes two databases:
41        * A small subset of the data in John Cremona's database of elliptic curves up
42          to conductor 10000. See http://www.warwick.ac.uk/~masgaj/ftp/data/ or
43          http://sage.math.washington.edu/cremona/INDEX.html
44        * William Stein's database of interesting curves
45     '';
46     license = licenses.gpl2;
47     platforms = platforms.all;
48     maintainers = teams.sage.members;
49   };