diff mbox series

[bug#56729,RFC,v2,22/29] gnu: Add sagemath-data-elliptic-curves.

Message ID 3c321223f64adb272aa9b446180236e24ee23673.1659973115.git.guix@ikherbers.com
State New
Headers show
Series Add sagemath. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

vicvbcun Aug. 8, 2022, 3:45 p.m. UTC
* gnu/packages/sagemath.scm (sagemath-data-elliptic-curves): New variable.
---
 gnu/packages/sagemath.scm | 45 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm
index 2d82c9ae2e..d4450d5d46 100644
--- a/gnu/packages/sagemath.scm
+++ b/gnu/packages/sagemath.scm
@@ -643,3 +643,48 @@  (define-public sagemath-data-conway-polynomials
       (description synopsis)
       ;; no idea, Arch claims gpl, debian gpl2+??
       (license #f))))
+
+(define-public sagemath-data-elliptic-curves
+  (let
+      ((install-py-origin
+        (origin
+          (method url-fetch)
+          (uri
+           "https://raw.githubusercontent.com/sagemath/sage/9.6/build/pkgs/elliptic_curves/spkg-install.py")
+          (sha256 (base32
+                   "116g684i6mvs11fvb6fzfsr4fn903axn31vigdyb8bgpf8l4hvc5")))))
+    (package
+      (name "sagemath-data-elliptic-curves")
+      (version "0.8.1")
+      (source (origin
+                (method url-fetch)
+                (uri (string-append
+                      "https://mirrors.mit.edu/sage/spkg/upstream/elliptic_curves/elliptic_curves-"
+                      version ".tar.bz2"))
+                (sha256
+                 (base32
+                  "0l7xh4abw5sb4d37r0ylr3vwb88fpx2zrvfm5ql0c7yrv5q59fjz"))))
+      (build-system trivial-build-system)
+      (arguments
+       (list #:modules '((guix build utils))
+             #:builder #~(begin
+                           (use-modules (guix build utils))
+
+                           (setenv "PATH"
+                                   (string-append #+(file-append bzip2 "/bin")
+                                                  ":"
+                                                  #+(file-append tar "/bin") ":"
+                                                  #+(file-append python "/bin")))
+                           (setenv "SAGE_SHARE" (string-append #$output "/share"))
+                           (setenv "PYTHONPATH" (getcwd))
+
+                           (invoke "tar" "-xvf" #$source)
+                           (symlink (string-append "elliptic_curves-" #$version) "src")
+                           (invoke "python3" (assoc-ref %build-inputs "install-py")))))
+      (inputs `(("install-py" ,install-py-origin)))
+      (home-page "https://johncremona.github.io/ecdata/")
+      (synopsis "Databases of elliptic curves")
+      (description synopsis)
+      ;; no idea, Arch claims gpl, alledgedly is part of
+      ;; https://github.com/JohnCremona/ecdata Artistic 2.0
+      (license #f))))