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