4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
51 lines
1.4 KiB
Nix
51 lines
1.4 KiB
Nix
{ lib, stdenv
|
|
, fetchurl
|
|
, python
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "elliptic_curves";
|
|
version = "0.8";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sageupstream/${pname}/${pname}-${version}.tar.bz2";
|
|
sha256 = "0pzaym44x88dn8rydiwqgm73yghzlgf7gqvd7qqsrsdl2vyp091w";
|
|
};
|
|
|
|
|
|
# Script that creates the sqlite database from the allcurves textfile
|
|
spkg-install = fetchurl {
|
|
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/${pname}/spkg-install.py?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
|
|
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
|
|
|
|
${python.interpreter} ${spkg-install}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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;
|
|
maintainers = teams.sage.members;
|
|
};
|
|
}
|