@@ -406,3 +406,47 @@ (define-public sagemath-data-conway-polynomials
(synopsis "Tables of Conway polynomials over finite fields")
(description synopsis)
(license #f))))
+
+(define-public sagemath-data-elliptic-curves
+ (let
+ ((install-py-origin
+ (origin
+ (method url-fetch)
+ (uri
+ "https://raw.githubusercontent.com/sagemath/sage/9.8/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
+ "mirror://sagemath/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-join (list #+(file-append bzip2 "/bin")
+ #+(file-append tar "/bin")
+ #+(file-append python "/bin"))
+ ":"))
+ ;; the output directory
+ (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)
+ (license #f))))