* [bug#41971] [WIP PATCH 0/5] Add SageMath
@ 2020-06-20 21:28 Jakub Kądziołka
2020-06-20 21:31 ` [bug#41971] [PATCH 1/5] gnu: linbox: Fix linking of dependant packages Jakub Kądziołka
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Jakub Kądziołka @ 2020-06-20 21:28 UTC (permalink / raw)
To: 41971
This patchstack builds upon #40283 and packages (some of) SageMath.
Currently, sagelib is built successfully, but the `sage' binary is not
being installed. I'm submitting this here as I'm no longer actively
working on this for now. Some things remain to be done:
- Install the sage command itself and make sure it runs. This will
probably require understanding what SAGE_ROOT, SAGE_SHARE and
SAGE_LOCAL mean.
- Run the tests. This would be best done as another package to make
sure all the right packages are propagated. Nix does the same [0].
- Make sure the docs are installed.
- Remove the cython debug info. I haven't done this yet only because
testing it would require waiting for a long build.
- Resolve some small TODOs.
[0]: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/science/math/sage
Jakub Kądziołka (5):
gnu: linbox: Fix linking of dependant packages.
gnu: sagemath: Remove unnecessary old versions of packages
gnu: Add ECL 16.1.3 for Sage.
gnu: lcalc: Don't rename the include directory.
[WIP] gnu: Add sagemath.
gnu/local.mk | 4 +
gnu/packages/algebra.scm | 5 +-
.../ecl-16-format-directive-limit.patch | 83 +++++++
.../ecl-16-ignore-stderr-write-error.patch | 17 ++
gnu/packages/patches/ecl-16-libffi.patch | 16 ++
.../patches/linbox-fix-pkgconfig.patch | 23 ++
gnu/packages/sagemath.scm | 203 +++++++++++++-----
7 files changed, 291 insertions(+), 60 deletions(-)
create mode 100644 gnu/packages/patches/ecl-16-format-directive-limit.patch
create mode 100644 gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch
create mode 100644 gnu/packages/patches/ecl-16-libffi.patch
create mode 100644 gnu/packages/patches/linbox-fix-pkgconfig.patch
--
2.26.2
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#41971] [PATCH 1/5] gnu: linbox: Fix linking of dependant packages.
2020-06-20 21:28 [bug#41971] [WIP PATCH 0/5] Add SageMath Jakub Kądziołka
@ 2020-06-20 21:31 ` Jakub Kądziołka
2020-06-20 21:31 ` [bug#41971] [PATCH 2/5] gnu: sagemath: Remove unnecessary old versions of packages Jakub Kądziołka
` (4 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Jakub Kądziołka @ 2020-06-20 21:31 UTC (permalink / raw)
To: 41971
* gnu/packages/algebra.scm (linbox)[source]: Add a patch.
[inputs]: Move fflas-ffpack to...
[propagated-inputs]: ...here.
* gnu/packages/patches/linbox-fix-pkgconfig.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/algebra.scm | 5 ++--
.../patches/linbox-fix-pkgconfig.patch | 23 +++++++++++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/linbox-fix-pkgconfig.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index def87a4360..41b92e3830 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1219,6 +1219,7 @@ dist_patch_DATA = \
%D%/packages/patches/lierolibre-newer-libconfig.patch \
%D%/packages/patches/lierolibre-remove-arch-warning.patch \
%D%/packages/patches/lierolibre-try-building-other-arch.patch \
+ %D%/packages/patches/linbox-fix-pkgconfig.patch \
%D%/packages/patches/linkchecker-tests-require-network.patch \
%D%/packages/patches/linphoneqt-tabbutton.patch \
%D%/packages/patches/linux-libre-support-for-Pinebook-Pro.patch \
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index f2138bbe4e..2244b7ac94 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -1323,14 +1323,15 @@ algebra, such as the row echelon form.")
(file-name (git-file-name name version))
(sha256
(base32
- "10j6dspbsq7d2l4q3y0c1l1xwmaqqba2fxg59q5bhgk9h5d7q571"))))
+ "10j6dspbsq7d2l4q3y0c1l1xwmaqqba2fxg59q5bhgk9h5d7q571"))
+ (patches (search-patches "linbox-fix-pkgconfig.patch"))))
(build-system gnu-build-system)
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
("libtool" ,libtool)
("pkg-config" ,pkg-config)))
- (inputs
+ (propagated-inputs
`(("fflas-ffpack" ,fflas-ffpack)))
(synopsis "C++ library for linear algebra over exact rings")
(description
diff --git a/gnu/packages/patches/linbox-fix-pkgconfig.patch b/gnu/packages/patches/linbox-fix-pkgconfig.patch
new file mode 100644
index 0000000000..c93915fb1b
--- /dev/null
+++ b/gnu/packages/patches/linbox-fix-pkgconfig.patch
@@ -0,0 +1,23 @@
+Backported from:
+
+From 426eb97ba762c7663884f57ead0909f2aa3cd6a5 Mon Sep 17 00:00:00 2001
+From: Cyril Bouvier <cyril.bouvier@lirmm.fr>
+Date: Thu, 17 Jan 2019 16:32:19 +0100
+Subject: [PATCH] Remove @LINBOXSAGE_LIBS@ from linbox.pc.in
+
+---
+ linbox.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linbox.pc.in b/linbox.pc.in
+index 278f127e4..c6b8091eb 100644
+--- a/linbox.pc.in
++++ b/linbox.pc.in
+@@ -9,6 +9,6 @@ Description: Exact Linear Algebra library
+ URL: http://github.com/linbox-team/linbox
+ Version: @VERSION@
+ Requires: fflas-ffpack >= 2.4.0, givaro >= 4.1.0
+-Libs: -L${libdir} -llinbox @LINBOXSAGE_LIBS@ @NTL_LIBS@ @MPFR_LIBS@ @FPLLL_LIBS@ @IML_LIBS@ @FLINT_LIBS@ @OCL_LIBS@
++Libs: -L${libdir} -llinbox @NTL_LIBS@ @MPFR_LIBS@ @FPLLL_LIBS@ @IML_LIBS@ @FLINT_LIBS@ @OCL_LIBS@
+ Cflags: @DEFAULT_CFLAGS@ -DDISABLE_COMMENTATOR -I${includedir} @NTL_CFLAGS@ @MPFR_CFLAGS@ @FPLLL_CFLAGS@ @IML_CFLAGS@ @FLINT_CFLAGS@
+ \-------------------------------------------------------
--
2.26.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#41971] [PATCH 2/5] gnu: sagemath: Remove unnecessary old versions of packages
2020-06-20 21:28 [bug#41971] [WIP PATCH 0/5] Add SageMath Jakub Kądziołka
2020-06-20 21:31 ` [bug#41971] [PATCH 1/5] gnu: linbox: Fix linking of dependant packages Jakub Kądziołka
@ 2020-06-20 21:31 ` Jakub Kądziołka
2020-06-20 21:31 ` [bug#41971] [PATCH 3/5] gnu: Add ECL 16.1.3 for Sage Jakub Kądziołka
` (3 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Jakub Kądziołka @ 2020-06-20 21:31 UTC (permalink / raw)
To: 41971
Sage has updated givaro, fflas-ffpack and linbox since the comment was
written.
* gnu/packages/sagemath.scm (givaro, fflas-ffpack, linbox): Remove
variables.
---
gnu/packages/sagemath.scm | 54 ---------------------------------------
1 file changed, 54 deletions(-)
diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm
index b96cb6b96e..34fe9e524c 100644
--- a/gnu/packages/sagemath.scm
+++ b/gnu/packages/sagemath.scm
@@ -184,60 +184,6 @@ represented as strings.")
(license license:public-domain)
(home-page "https://github.com/miguelmarco/libhomfly")))
-;; The following three packages from the Linbox group are needed in
-;; an outdated version for Sage.
-
-(define-public givaro-4.0.4
- (package (inherit givaro)
- (name "givaro")
- (version "4.0.4")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/linbox-team/givaro")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "199p8wyj5i63jbnk7j8qbdbfp5rm2lpmcxyk3mdjy9bz7ygx3hhy"))))))
-
-(define-public fflas-ffpack-2.3.2
- (package (inherit fflas-ffpack)
- (name "fflas-ffpack")
- (version "2.3.2")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/linbox-team/fflas-ffpack")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1cqhassj2dny3gx0iywvmnpq8ca0d6m82xl5rz4mb8gaxr2kwddl"))))
- (propagated-inputs
- `(("givaro" ,givaro-4.0.4)))
- ;; A test fails, but since all tests pass in the latest version,
- ;; there is not much point in investigating.
- (arguments
- (substitute-keyword-arguments (package-arguments fflas-ffpack)
- ((#:tests? _ #f) #f)))))
-
-(define-public linbox-1.5.2
- (package (inherit linbox)
- (version "1.5.2")
- (name "linbox")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/linbox-team/linbox")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1wfivlwp30mzdy1697w7rzb8caajim50mc8h27k82yipn2qc5n4i"))))
- (inputs
- `(("fflas-ffpack" ,fflas-ffpack-2.3.2)))))
-
(define-public pynac
(package
(name "pynac")
--
2.26.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#41971] [PATCH 3/5] gnu: Add ECL 16.1.3 for Sage.
2020-06-20 21:28 [bug#41971] [WIP PATCH 0/5] Add SageMath Jakub Kądziołka
2020-06-20 21:31 ` [bug#41971] [PATCH 1/5] gnu: linbox: Fix linking of dependant packages Jakub Kądziołka
2020-06-20 21:31 ` [bug#41971] [PATCH 2/5] gnu: sagemath: Remove unnecessary old versions of packages Jakub Kądziołka
@ 2020-06-20 21:31 ` Jakub Kądziołka
2020-06-20 21:32 ` [bug#41971] [PATCH 4/5] gnu: lcalc: Don't rename the include directory Jakub Kądziołka
` (2 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Jakub Kądziołka @ 2020-06-20 21:31 UTC (permalink / raw)
To: 41971
* gnu/packages/sagemath.scm (ecl-16): New variable.
* gnu/packages/patches/ecl-16-format-directive-limit.patch,
gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch,
gnu/packages/patches/ecl-16-libffi.patch: New files.
* gnu/local.mk (dist_patch_DATA): Register the patches.
---
gnu/local.mk | 3 +
.../ecl-16-format-directive-limit.patch | 83 +++++++++++++++++++
.../ecl-16-ignore-stderr-write-error.patch | 17 ++++
gnu/packages/patches/ecl-16-libffi.patch | 16 ++++
gnu/packages/sagemath.scm | 23 +++++
5 files changed, 142 insertions(+)
create mode 100644 gnu/packages/patches/ecl-16-format-directive-limit.patch
create mode 100644 gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch
create mode 100644 gnu/packages/patches/ecl-16-libffi.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 41b92e3830..486e7aa8cc 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -881,6 +881,9 @@ dist_patch_DATA = \
%D%/packages/patches/dstat-skip-devices-without-io.patch \
%D%/packages/patches/dune-istl-2.7-fix-non-mpi-tests.patch \
%D%/packages/patches/dvd+rw-tools-add-include.patch \
+ %D%/packages/patches/ecl-16-format-directive-limit.patch \
+ %D%/packages/patches/ecl-16-ignore-stderr-write-error.patch \
+ %D%/packages/patches/ecl-16-libffi.patch \
%D%/packages/patches/eigen-stabilise-sparseqr-test.patch \
%D%/packages/patches/einstein-build.patch \
%D%/packages/patches/elfutils-tests-ptrace.patch \
diff --git a/gnu/packages/patches/ecl-16-format-directive-limit.patch b/gnu/packages/patches/ecl-16-format-directive-limit.patch
new file mode 100644
index 0000000000..237db92722
--- /dev/null
+++ b/gnu/packages/patches/ecl-16-format-directive-limit.patch
@@ -0,0 +1,83 @@
+Patch backported by Sage.
+
+Fix from upstream that happens to work around
+https://trac.sagemath.org/ticket/23011
+diff --git a/src/lsp/format.lsp b/src/lsp/format.lsp
+index 77ca799..53b887c 100644
+--- a/src/lsp/format.lsp
++++ b/src/lsp/format.lsp
+@@ -307,11 +307,13 @@
+ :start (format-directive-start struct)
+ :end (format-directive-end struct))))
+
++(defconstant +format-directive-limit+ (1+ (char-code #\~)))
++
+ #+formatter
+ (defparameter *format-directive-expanders*
+- (make-array char-code-limit :initial-element nil))
++ (make-array +format-directive-limit+ :initial-element nil))
+ (defparameter *format-directive-interpreters*
+- (make-array char-code-limit :initial-element nil))
++ (make-array +format-directive-limit+ :initial-element nil))
+
+ (defparameter *default-format-error-control-string* nil)
+ (defparameter *default-format-error-offset* nil)
+@@ -550,24 +552,24 @@
+ (write-string directive stream)
+ (interpret-directive-list stream (cdr directives) orig-args args))
+ (#-ecl format-directive #+ecl vector
++ (multiple-value-bind
++ (new-directives new-args)
++ (let* ((code (char-code (format-directive-character directive)))
++ (function
++ (and (< code +format-directive-limit+)
++ (svref *format-directive-interpreters* code)))
++ (*default-format-error-offset*
++ (1- (format-directive-end directive))))
++ (unless function
++ (error 'format-error
++ :complaint "Unknown format directive."))
+ (multiple-value-bind
+ (new-directives new-args)
+- (let ((function
+- (svref *format-directive-interpreters*
+- (char-code (format-directive-character
+- directive))))
+- (*default-format-error-offset*
+- (1- (format-directive-end directive))))
+- (unless function
+- (error 'format-error
+- :complaint "Unknown format directive."))
+- (multiple-value-bind
+- (new-directives new-args)
+- (funcall function stream directive
+- (cdr directives) orig-args args)
+- (values new-directives new-args)))
+- (interpret-directive-list stream new-directives
+- orig-args new-args)))))
++ (funcall function stream directive
++ (cdr directives) orig-args args)
++ (values new-directives new-args)))
++ (interpret-directive-list stream new-directives
++ orig-args new-args)))))
+ args))
+
+ \f
+@@ -639,11 +641,12 @@
+ (values `(write-string ,directive stream)
+ more-directives))
+ (format-directive
+- (let ((expander
+- (aref *format-directive-expanders*
+- (char-code (format-directive-character directive))))
+- (*default-format-error-offset*
+- (1- (format-directive-end directive))))
++ (let* ((code (char-code (format-directive-character directive)))
++ (expander
++ (and (< code +format-directive-limit+)
++ (svref *format-directive-expanders* code)))
++ (*default-format-error-offset*
++ (1- (format-directive-end directive))))
+ (if expander
+ (funcall expander directive more-directives)
+ (error 'format-error
diff --git a/gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch b/gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch
new file mode 100644
index 0000000000..42d213c0e9
--- /dev/null
+++ b/gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch
@@ -0,0 +1,17 @@
+Patch adapted from Sage.
+diff -Naur ecl-16.1.2.orig/src/c/file.d ecl-16.1.2/src/c/file.d
+--- ecl-16.1.2.orig/src/c/file.d 2016-05-11 13:10:51.867673867 +1200
++++ ecl-16.1.2/src/c/file.d 2016-05-11 14:44:48.121907307 +1200
+@@ -3354,8 +3354,10 @@
+ ecl_disable_interrupts();
+ do {
+ out = fwrite(c, sizeof(char), n, IO_STREAM_FILE(strm));
+- } while (out < n && restartable_io_error(strm, "fwrite"));
+- ecl_enable_interrupts();
++ /* Ignore write errors to stderr to avoid an infinite loop */
++ } while (out < n && (IO_STREAM_FILE(strm) != stderr) && restartable_io_error(strm, "fwrite"));
++
++ ecl_enable_interrupts();
+ return out;
+ }
+
diff --git a/gnu/packages/patches/ecl-16-libffi.patch b/gnu/packages/patches/ecl-16-libffi.patch
new file mode 100644
index 0000000000..fc06a07606
--- /dev/null
+++ b/gnu/packages/patches/ecl-16-libffi.patch
@@ -0,0 +1,16 @@
+Patch adapted from Sage. Allows building ECL on libffi 3.3.
+diff --git a/src/c/ffi.d b/src/c/ffi.d
+index 8861303e..8a959c23 100644
+--- a/src/c/ffi.d
++++ b/src/c/ffi.d
+@@ -133,8 +133,8 @@ static struct {
+ #elif defined(X86_WIN64)
+ {@':win64', FFI_WIN64},
+ #elif defined(X86_ANY) || defined(X86) || defined(X86_64)
+- {@':cdecl', FFI_SYSV},
+- {@':sysv', FFI_SYSV},
++ {@':cdecl', FFI_UNIX64},
++ {@':sysv', FFI_UNIX64},
+ {@':unix64', FFI_UNIX64},
+ #endif
+ };
diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm
index 34fe9e524c..c94020f13e 100644
--- a/gnu/packages/sagemath.scm
+++ b/gnu/packages/sagemath.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,6 +34,7 @@
#:use-module (gnu packages boost)
#:use-module (gnu packages compression)
#:use-module (gnu packages image)
+ #:use-module (gnu packages lisp)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -184,6 +186,27 @@ represented as strings.")
(license license:public-domain)
(home-page "https://github.com/miguelmarco/libhomfly")))
+;; Sage 9.1 doesn't build with ECL 20. This won't be necessary once 9.2 is
+;; released. See https://trac.sagemath.org/ticket/22191
+(define-public ecl-16
+ (package
+ (inherit ecl)
+ (version "16.1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://common-lisp.net/project/ecl/static/files/release/ecl"
+ "-" version ".tgz"))
+ (sha256
+ (base32 "0m0j24w5d5a9dwwqyrg0d35c0nys16ijb4r0nyk87yp82v38b9bn"))
+ (patches (search-patches
+ "ecl-16-libffi.patch"
+ "ecl-16-ignore-stderr-write-error.patch"
+ "ecl-16-format-directive-limit.patch"))))
+ ;; Current ECL uses LGPL 2.1+
+ (license license:lgpl2.0+)))
+
(define-public pynac
(package
(name "pynac")
--
2.26.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#41971] [PATCH 4/5] gnu: lcalc: Don't rename the include directory.
2020-06-20 21:28 [bug#41971] [WIP PATCH 0/5] Add SageMath Jakub Kądziołka
` (2 preceding siblings ...)
2020-06-20 21:31 ` [bug#41971] [PATCH 3/5] gnu: Add ECL 16.1.3 for Sage Jakub Kądziołka
@ 2020-06-20 21:32 ` Jakub Kądziołka
2020-06-20 21:32 ` [bug#41971] [PATCH 5/5] [WIP] gnu: Add sagemath Jakub Kądziołka
2020-07-07 12:47 ` [bug#41971] [WIP PATCH 0/5] Add SageMath Nicolas Goaziou
5 siblings, 0 replies; 12+ messages in thread
From: Jakub Kądziołka @ 2020-06-20 21:32 UTC (permalink / raw)
To: 41971
Sage no longer renames the directory, so we shouldn't either.
* gnu/packages/sagemath.scm (lcalc)[arguments]: Remove a substitution from
the prepare-build phase.
---
gnu/packages/sagemath.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm
index c94020f13e..8c837fdaeb 100644
--- a/gnu/packages/sagemath.scm
+++ b/gnu/packages/sagemath.scm
@@ -368,10 +368,7 @@ used as internal storage type for polynomial structures.")
(let ((out (assoc-ref outputs "out")))
(substitute* "Makefile"
(("^INSTALL_DIR= /usr/local")
- (string-append "INSTALL_DIR=" out))
- ;; Sage renames the include directory, so we do it also.
- (("include/Lfunction")
- "include/libLfunction")))
+ (string-append "INSTALL_DIR=" out))))
#t))
(add-before 'install 'make-output-dirs
(lambda* (#:key outputs #:allow-other-keys)
--
2.26.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#41971] [PATCH 5/5] [WIP] gnu: Add sagemath.
2020-06-20 21:28 [bug#41971] [WIP PATCH 0/5] Add SageMath Jakub Kądziołka
` (3 preceding siblings ...)
2020-06-20 21:32 ` [bug#41971] [PATCH 4/5] gnu: lcalc: Don't rename the include directory Jakub Kądziołka
@ 2020-06-20 21:32 ` Jakub Kądziołka
2020-07-07 12:47 ` [bug#41971] [WIP PATCH 0/5] Add SageMath Nicolas Goaziou
5 siblings, 0 replies; 12+ messages in thread
From: Jakub Kądziołka @ 2020-06-20 21:32 UTC (permalink / raw)
To: 41971
---
gnu/packages/sagemath.scm | 123 +++++++++++++++++++++++++++++++++++++-
1 file changed, 122 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm
index 8c837fdaeb..9809f93060 100644
--- a/gnu/packages/sagemath.scm
+++ b/gnu/packages/sagemath.scm
@@ -29,16 +29,33 @@
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
+ #:use-module (gnu packages assembly)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bdw-gc)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages cmake)
+ #:use-module (gnu packages commencement)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages gd)
+ #:use-module (gnu packages gettext)
+ #:use-module (gnu packages graph)
#:use-module (gnu packages image)
+ #:use-module (gnu packages libffi)
#:use-module (gnu packages lisp)
+ #:use-module (gnu packages m4)
+ #:use-module (gnu packages maths)
#:use-module (gnu packages multiprecision)
+ #:use-module (gnu packages ncurses)
+ #:use-module (gnu packages networking)
+ #:use-module (gnu packages pcre)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
- #:use-module (gnu packages python-xyz))
+ #:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages readline)
+ #:use-module (gnu packages sqlite)
+ #:use-module (gnu packages tex)
+ #:use-module (gnu packages tls))
(define-public python-cypari2
@@ -432,3 +449,107 @@ zeta function and its twists by quadratic characters.")
a given height bound on a hyperelliptic curve in a very efficient way,
by using an optimized quadratic sieve algorithm.")
(license license:gpl2+)))
+
+(define-public sagemath
+ (package
+ (name "sagemath")
+ (version "9.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "git://git.sagemath.org/sage.git/")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1imlqa5mg7xxp6xbzzjnjjpd8k79vlx48zm0qfj7cd4bi0i809pp"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:use-setuptools? #f
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'prepare
+ (lambda _
+ (setenv "HOME" "/tmp")
+ (setenv "SAGE_ROOT" (getcwd))
+ (setenv "SAGE_LOCAL" (getcwd))
+ (setenv "SAGE_SHARE" (string-append (getcwd) "/share"))
+ (setenv "SAGE_NUM_THREADS" (number->string (parallel-job-count)))
+ (mkdir-p "var/lib/sage/installed")
+ (chdir "src")
+ #t)))))
+ (propagated-inputs
+ `(("python-cypari2" ,python-cypari2)
+ ("python-cysignals" ,python-cysignals)
+ ("python-cython" ,python-cython)
+ ("python-gmpy2" ,python-gmpy2)
+ ("python-jinja2" ,python-jinja2)
+ ("python-numpy" ,python-numpy)
+ ("python-pkgconfig" ,python-pkgconfig)
+ ("python-six" ,python-six)))
+ (inputs
+ `(("arb" ,arb)
+ ("boost" ,boost) ; TODO: Is this needed?
+ ("braiding" ,libbraiding)
+ ("brial" ,brial)
+ ("bzip2" ,bzip2)
+ ("cliquer" ,cliquer)
+ ("ecl" ,ecl-16)
+ ("eclib" ,eclib)
+ ("ecm" ,gmp-ecm)
+ ("ecm:libatomic-ops" ,libatomic-ops)
+ ("flint" ,flint)
+ ("gf2x" ,gf2x)
+ ("gap" ,gap)
+ ("gc" ,libgc)
+ ("gd" ,gd)
+ ("givaro" ,givaro)
+ ("glpk" ,glpk)
+ ("gmp" ,gmp)
+ ("gsl" ,gsl)
+ ("homfly" ,libhomfly)
+ ("iml" ,iml)
+ ("lcalc" ,lcalc)
+ ("libffi" ,libffi)
+ ("libpng" ,libpng)
+ ("linbox" ,linbox)
+ ("lrcalc" ,lrcalc)
+ ("m4ri" ,m4ri)
+ ("m4rie" ,m4rie)
+ ("mpc" ,mpc)
+ ("mpfi" ,mpfi)
+ ("mpfr" ,mpfr)
+ ("ncurses" ,ncurses)
+ ("ntl" ,ntl)
+ ("openssl" ,openssl)
+ ("pari" ,pari-gp)
+ ("pcre" ,pcre)
+ ("planarity" ,edge-addition-planarity-suite)
+ ("ppl" ,ppl)
+ ("pynac" ,pynac)
+ ("rw" ,rw)
+ ("ratpoints" ,ratpoints)
+ ("readline" ,readline)
+ ("singular" ,singular)
+ ("sqlite" ,sqlite)
+ ("symmetrica" ,symmetrica)
+ ("texlive" ,texlive-tiny)
+ ("zeromq" ,zeromq) ; TODO: Is this needed?
+ ("zlib" ,zlib)
+ ("zn-poly" ,zn-poly)))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("cmake" ,cmake)
+ ("gettext" ,gettext-minimal)
+ ("gfortran" ,gfortran-toolchain)
+ ("m4" ,m4)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("yasm" ,yasm)))
+ (home-page "https://www.sagemath.org/")
+ (synopsis "Python-based computer algebra system")
+ (description "TODO")
+ (license license:gpl3)))
--
2.26.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#41971] [WIP PATCH 0/5] Add SageMath
2020-06-20 21:28 [bug#41971] [WIP PATCH 0/5] Add SageMath Jakub Kądziołka
` (4 preceding siblings ...)
2020-06-20 21:32 ` [bug#41971] [PATCH 5/5] [WIP] gnu: Add sagemath Jakub Kądziołka
@ 2020-07-07 12:47 ` Nicolas Goaziou
2020-07-10 21:06 ` bug#40283: " Jakub Kądziołka
2023-03-20 14:13 ` Ludovic Courtès
5 siblings, 2 replies; 12+ messages in thread
From: Nicolas Goaziou @ 2020-07-07 12:47 UTC (permalink / raw)
To: Jakub Kądziołka; +Cc: 41971, andreas
Hello,
Jakub Kądziołka <kuba@kadziolka.net> writes:
> This patchstack builds upon #40283 and packages (some of) SageMath.
> Currently, sagelib is built successfully, but the `sage' binary is not
> being installed. I'm submitting this here as I'm no longer actively
> working on this for now. Some things remain to be done:
Thanks!
Would it make sense to add the uncontroversial fourth first patches,
along with #40283, so it is easier to hack on the sagemath package
itself?
I'm also Cc'ing Andreas Enge, who showed interest in packaging Sagemath
a few months ago, and, AFAIK, was close to succeeding.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#40283: [bug#41971] [WIP PATCH 0/5] Add SageMath
2020-07-07 12:47 ` [bug#41971] [WIP PATCH 0/5] Add SageMath Nicolas Goaziou
@ 2020-07-10 21:06 ` Jakub Kądziołka
2023-03-20 14:13 ` Ludovic Courtès
1 sibling, 0 replies; 12+ messages in thread
From: Jakub Kądziołka @ 2020-07-10 21:06 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: 41971, andreas, 40283-done
[-- Attachment #1: Type: text/plain, Size: 796 bytes --]
On Tue, Jul 07, 2020 at 02:47:28PM +0200, Nicolas Goaziou wrote:
> Hello,
>
> Jakub Kądziołka <kuba@kadziolka.net> writes:
>
> > This patchstack builds upon #40283 and packages (some of) SageMath.
> > Currently, sagelib is built successfully, but the `sage' binary is not
> > being installed. I'm submitting this here as I'm no longer actively
> > working on this for now. Some things remain to be done:
>
> Thanks!
>
> Would it make sense to add the uncontroversial fourth first patches,
> along with #40283, so it is easier to hack on the sagemath package
> itself?
Sure it would! I just did.
> I'm also Cc'ing Andreas Enge, who showed interest in packaging Sagemath
> a few months ago, and, AFAIK, was close to succeeding.
Thanks!
Regards,
Jakub Kądziołka
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#41971] [WIP PATCH 0/5] Add SageMath
2020-07-07 12:47 ` [bug#41971] [WIP PATCH 0/5] Add SageMath Nicolas Goaziou
2020-07-10 21:06 ` bug#40283: " Jakub Kądziołka
@ 2023-03-20 14:13 ` Ludovic Courtès
2023-03-20 15:01 ` Andreas Enge
2023-03-20 18:13 ` Maja Kądziołka
1 sibling, 2 replies; 12+ messages in thread
From: Ludovic Courtès @ 2023-03-20 14:13 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Jakub Kądziołka, 41971, andreas
Hello!
Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:
> Jakub Kądziołka <kuba@kadziolka.net> writes:
>
>> This patchstack builds upon #40283 and packages (some of) SageMath.
>> Currently, sagelib is built successfully, but the `sage' binary is not
>> being installed. I'm submitting this here as I'm no longer actively
>> working on this for now. Some things remain to be done:
>
> Thanks!
>
> Would it make sense to add the uncontroversial fourth first patches,
> along with #40283, so it is easier to hack on the sagemath package
> itself?
Time has passed, but it still sounds like a nice addition.
Andreas, Nicolas: should one of you go ahead and apply part of these
patches?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#41971] [WIP PATCH 0/5] Add SageMath
2023-03-20 14:13 ` Ludovic Courtès
@ 2023-03-20 15:01 ` Andreas Enge
2023-03-20 18:13 ` Maja Kądziołka
1 sibling, 0 replies; 12+ messages in thread
From: Andreas Enge @ 2023-03-20 15:01 UTC (permalink / raw)
To: Ludovic Courtès
Cc: Jakub Kądziołka, 41971, Guillaume Le Vaillant,
Nicolas Goaziou
Am Mon, Mar 20, 2023 at 03:13:24PM +0100 schrieb Ludovic Courtès:
> > Would it make sense to add the uncontroversial fourth first patches,
> > along with #40283, so it is easier to hack on the sagemath package
> > itself?
> Time has passed, but it still sounds like a nice addition.
There is also
https://issues.guix.gnu.org/56729
where I was waiting for a reply from the submitter, and/or Guillaume
concerning the Lisp version with which Maxima is compiled.
I would have to get back to both issues to see what the current status is,
but could only do so in a week or two.
Andreas
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#41971] [WIP PATCH 0/5] Add SageMath
2023-03-20 14:13 ` Ludovic Courtès
2023-03-20 15:01 ` Andreas Enge
@ 2023-03-20 18:13 ` Maja Kądziołka
2023-03-21 9:40 ` bug#41971: " Ludovic Courtès
1 sibling, 1 reply; 12+ messages in thread
From: Maja Kądziołka @ 2023-03-20 18:13 UTC (permalink / raw)
To: Ludovic Courtès, Nicolas Goaziou; +Cc: 41971, andreas
On 20/03/2023 15:13, Ludovic Courtès wrote:
> Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:
>
>> Would it make sense to add the uncontroversial fourth first patches,
>> along with #40283, so it is easier to hack on the sagemath package
>> itself?
>
> Time has passed, but it still sounds like a nice addition.
>
> Andreas, Nicolas: should one of you go ahead and apply part of these
> patches?
>
> Thanks,
> Ludo’.
Wow, I wrote these patches like 2 genders and 3 distros ago :P
FWIW, they did get pushed to master when you first suggested it, at
commit db7f74d2eb4878c0a9ed8bb33853090752277370 and friends.
Regards,
Maya :3
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#41971: [WIP PATCH 0/5] Add SageMath
2023-03-20 18:13 ` Maja Kądziołka
@ 2023-03-21 9:40 ` Ludovic Courtès
0 siblings, 0 replies; 12+ messages in thread
From: Ludovic Courtès @ 2023-03-21 9:40 UTC (permalink / raw)
To: Maja Kądziołka; +Cc: andreas, 41971-done, Nicolas Goaziou
Hi,
Maja Kądziołka <kuba@kadziolka.net> skribis:
> FWIW, they did get pushed to master when you first suggested it, at
> commit db7f74d2eb4878c0a9ed8bb33853090752277370 and friends.
Ooooh, right! My bad.
Closing, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-03-21 9:41 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-20 21:28 [bug#41971] [WIP PATCH 0/5] Add SageMath Jakub Kądziołka
2020-06-20 21:31 ` [bug#41971] [PATCH 1/5] gnu: linbox: Fix linking of dependant packages Jakub Kądziołka
2020-06-20 21:31 ` [bug#41971] [PATCH 2/5] gnu: sagemath: Remove unnecessary old versions of packages Jakub Kądziołka
2020-06-20 21:31 ` [bug#41971] [PATCH 3/5] gnu: Add ECL 16.1.3 for Sage Jakub Kądziołka
2020-06-20 21:32 ` [bug#41971] [PATCH 4/5] gnu: lcalc: Don't rename the include directory Jakub Kądziołka
2020-06-20 21:32 ` [bug#41971] [PATCH 5/5] [WIP] gnu: Add sagemath Jakub Kądziołka
2020-07-07 12:47 ` [bug#41971] [WIP PATCH 0/5] Add SageMath Nicolas Goaziou
2020-07-10 21:06 ` bug#40283: " Jakub Kądziołka
2023-03-20 14:13 ` Ludovic Courtès
2023-03-20 15:01 ` Andreas Enge
2023-03-20 18:13 ` Maja Kądziołka
2023-03-21 9:40 ` bug#41971: " Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.