guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: vicvbcun
Subject: [bug#56729] [RFC PATCH v2 29/29] gnu: Add sagemath-tests.
Date: Mon, 8 Aug 2022 17:46:04 +0200

* gnu/packages/sagemath.scm (sagemath-tests): New variable.
---
 gnu/packages/sagemath.scm | 51 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

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)))
-- 
2.37.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]