diff mbox series

[bug#56729,RFC,v2,29/29] gnu: Add sagemath-tests.

Message ID dba1e63f754c51eac846ab7f19cb613e7640849e.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:46 p.m. UTC
* gnu/packages/sagemath.scm (sagemath-tests): New variable.
---
 gnu/packages/sagemath.scm | 51 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm
index af0aad04dc..7a38a462b3 100644
--- a/gnu/packages/sagemath.scm
+++ b/gnu/packages/sagemath.scm
@@ -968,3 +968,54 @@  (define-public sagemath-with-dependencies
     (synopsis "")
     (description "")
     (license #f)))
+
+(define-public sagemath-tests
+  (package
+    (name "sagemath-tests")
+    (version "9.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/sagemath/sage")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0k91l3aid09hy94ps2r6acg22bxgsprxnh1b92hma3z1mn0ii3s1"))))
+    (build-system python-build-system)
+    (arguments
+     (list #:tests? #f
+           #:modules '((guix build python-build-system)
+                       (guix build utils)
+                       (ice-9 ftw))
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'prepare
+                          (lambda _
+                            (setenv "MAXIMA_FAS" #$(file-append maxima "/lib/maxima/" (package-version maxima) "/binary-ecl/maxima.fas"))
+                            (setenv "COMBINATORIAL_DESIGN_DATA_DIR" #$(file-append sagemath-data-combinatorial-designs "/share/combinatorial_designs"))
+                            (setenv "CONWAY_POLYNOMIALS_DATA_DIR" #$(file-append sagemath-data-conway-polynomials "/share/conway_polynomials"))
+                            (setenv "ELLCURVE_DATA_DIR" #$(file-append sagemath-data-elliptic-curves "/share/ellcurves"))
+                            (setenv "GRAPHS_DATA_DIR" #$(file-append sagemath-data-graphs "/share/graphs"))
+                            (setenv "CREMONA_MINI_DATA_DIR" #$(file-append sagemath-data-elliptic-curves "/share/cremona"))
+                            (setenv "GAP_SO" #$(file-append gap "/lib/libgap.so"))
+                            (setenv "GAP_ROOT_DIR" #$(file-append gap "/share/gap"))
+                            (setenv "GP_DATA_DIR" #$(file-append pari-galdata "/share/pari"))
+                            (setenv "POLYTOPE_DATA_DIR" #$(file-append sagemath-data-polytopes-db "/share/reflexive_polytopes"))
+                            (setenv "HOME" (string-append (getenv "TMPDIR") "/home"))
+                            (chdir "src")))
+                        (replace 'build
+                          (lambda _
+                            (invoke #$(file-append sagemath-just-build "/bin/sage")
+                                    "-t"
+                                    "--nthreads" (number->string (parallel-job-count))
+                                    "--all")))
+                        (replace 'install
+                          (lambda _
+                            (with-output-to-file #$output
+                              (lambda () (display "")))))
+                        (delete 'install-license-files))))
+    (native-inputs (list sagemath-with-dependencies))
+    (home-page "")
+    (synopsis "")
+    (description "")
+    (license #f)))