summary refs log tree commit diff
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2018-04-24 23:30:08 +0200
committerTimo Kaufmann <timokau@zoho.com>2018-06-30 01:20:45 +0200
commitb6f07b1d9e8c8866b222af5f6d3d8a43e34451e7 (patch)
treee2ed31d1d1af421cf8e7aa11f30c97f863edc7ba
parentc7d4528a89971105e54aa58a86f39e6895e66942 (diff)
downloadnixpkgs-b6f07b1d9e8c8866b222af5f6d3d8a43e34451e7.tar
nixpkgs-b6f07b1d9e8c8866b222af5f6d3d8a43e34451e7.tar.gz
nixpkgs-b6f07b1d9e8c8866b222af5f6d3d8a43e34451e7.tar.bz2
nixpkgs-b6f07b1d9e8c8866b222af5f6d3d8a43e34451e7.tar.lz
nixpkgs-b6f07b1d9e8c8866b222af5f6d3d8a43e34451e7.tar.xz
nixpkgs-b6f07b1d9e8c8866b222af5f6d3d8a43e34451e7.tar.zst
nixpkgs-b6f07b1d9e8c8866b222af5f6d3d8a43e34451e7.zip
elliptic_curves: init at 0.8
-rw-r--r--pkgs/data/misc/elliptic_curves/default.nix51
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/data/misc/elliptic_curves/default.nix b/pkgs/data/misc/elliptic_curves/default.nix
new file mode 100644
index 00000000000..528486328c6
--- /dev/null
+++ b/pkgs/data/misc/elliptic_curves/default.nix
@@ -0,0 +1,51 @@
+{ stdenv
+, fetchurl
+, python
+}:
+
+stdenv.mkDerivation rec {
+  pname = "elliptic_curves";
+  version = "0.8";
+  name = "${pname}-${version}";
+
+  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 stdenv.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 = with maintainers; [ timokau ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 17d81613f20..877f2f11cba 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -14596,6 +14596,8 @@ with pkgs;
 
   eb-garamond = callPackage ../data/fonts/eb-garamond { };
 
+  elliptic_curves = callPackage ../data/misc/elliptic_curves { };
+
   faba-icon-theme = callPackage ../data/icons/faba-icon-theme { };
 
   faba-mono-icons = callPackage ../data/icons/faba-mono-icons { };