diff mbox series

[bug#56729,RFC,v2,21/29] gnu: Add sagemath-data-conway-polynomials.

Message ID 7314b2386dcd862d4405340ab7b3e27dac24df6b.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
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-conway-polynomials): New variable.
---
 gnu/packages/sagemath.scm | 48 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm
index 4ffc3fb9ba..2d82c9ae2e 100644
--- a/gnu/packages/sagemath.scm
+++ b/gnu/packages/sagemath.scm
@@ -25,6 +25,7 @@  (define-module (gnu packages sagemath)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system trivial)
   #:use-module (guix download)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
@@ -33,6 +34,7 @@  (define-module (gnu packages sagemath)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bdw-gc)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
@@ -595,3 +597,49 @@  (define-public tachyon
     (synopsis "Multithreaded ray tracing software")
     (description synopsis)
     (license license:bsd-3)))
+
+(define-public sagemath-data-conway-polynomials
+  (let
+      ((install-py-origin
+        (origin
+          (method url-fetch)
+          (uri
+           "https://raw.githubusercontent.com/sagemath/sage/9.6/build/pkgs/conway_polynomials/spkg-install.py")
+          (sha256 (base32
+                   "1bwnqasnyv793hxg29viing4dnliz29grkhldsirq19d509yk1fs")))))
+    (package
+      (name "sagemath-data-conway-polynomials")
+      (version "0.5")
+      (source (origin
+                (method url-fetch)
+                (uri (string-append
+                      "https://mirrors.mit.edu/sage/spkg/upstream/conway_polynomials/conway_polynomials-"
+                      version ".tar.bz2"))
+                (sha256
+                 (base32
+                  "05zb1ly9x2bbscqv0jgc45g48xx77mfs7qdbqhn4ihmihn57iwnq"))))
+      (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 "conway_polynomials-" #$version) "src")
+                           (invoke "python3" (assoc-ref %build-inputs "install-py")))))
+      (inputs `(("install-py" ,install-py-origin)))
+      (home-page
+       "https://www.math.rwth-aachen.de/~Frank.Luebeck/data/ConwayPol/index.html")
+      (synopsis "Tables of Conway polynomials over finite fields")
+      (description synopsis)
+      ;; no idea, Arch claims gpl, debian gpl2+??
+      (license #f))))