GNU bug report logs - #76270
[PATCH 0/2] Add sage.

Previous Next

Package: guix-patches;

Reported by: Andreas Enge <andreas <at> enge.fr>

Date: Thu, 13 Feb 2025 15:19:02 UTC

Severity: normal

Tags: patch

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andreas Enge <andreas <at> enge.fr>
To: 76270 <at> debbugs.gnu.org
Cc: Guillaume Le Vaillant <glv <at> posteo.net>, Andreas Enge <andreas <at> enge.fr>, vicvbcun <guix <at> ikherbers.com>, Sharlatan Hellseher <sharlatanus <at> gmail.com>, Vinicius Monego <monego <at> posteo.net>, Andreas Enge <andreas <at> enge.fr>, Eric Bavier <bavier <at> posteo.net>, Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [bug#76270] [PATCH v2 1/2] gnu: maxima: Compile with ecl instead of sbcl.
Date: Thu, 13 Feb 2025 20:59:47 +0100
Hello,

thanks a lot, Nicolas, for this quick review!

The comment on changing the style using this-package-input is a good
remark, I was not aware of it. I also tried to adapt the style according
to your other suggestions (but am not totally sure about the canonical
order of the fields of a package).

Here is a new version with a maxima package modified to use ecl, instead
of a separate package.

In the meantime, I have also changed (on master) the names of the data
packages according to our package guidelines. In the end it does not
matter that much because I think that the packages are not needed or
even usable outside of sage, so they can be hidden by using define
instead of define-public. I have done so for conway-polynomials, which I
have added to sage. Now the command "conway_polynomial (2, 5)" returns a
value instead of an error. Just adding them makes no difference for the
other data packages, however, so I have refrained from adding them for
the moment.

I have also added python-fpylll. To check that it makes a difference, I
have used the following sage code, given to me by a participant of the
workshop I am attending right now:
from sage.features.all import all_features
for feature in all_features():
    print (feature, end="\t")
    try:
        feature.require()
        print ("yes")
    except:
        print ("no")

It prints a long list of features, among which there is now
Feature('fpylll')	yes
with "yes" instead of "no" previously.

The two commits are also on the branch wip-sage2.

Andreas



[PATCH v2 1/2] gnu: maxima: Compile with ecl instead of sbcl.

This is needed by sage and does not change the maxima functionality.

* gnu/packages/maths.scm (maxima)[inputs]: Replace sbcl by ecl.
[arguments]<configure-flags>: Adapt to use ecl. Drop unneeded flags.
<phases>{check}: Adapt to use ecl.
{install-lib}: Add phase to install the file maxima.fas.

Change-Id: I71a14d064e67aa34fdd7f6eb8499dfbd1dea11b9
---
 gnu/packages/maths.scm | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 4a1637b952..08c9201b0c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2023, 2024 Andreas Enge <andreas <at> enge.fr>
+;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2023, 2024, 2025 Andreas Enge <andreas <at> enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita <at> karetnikov.org>
 ;;; Copyright © 2014, 2016, 2017 John Darrington <jmd <at> gnu.org>
 ;;; Copyright © 2014-2022 Eric Bavier <bavier <at> posteo.net>
@@ -5417,8 +5417,8 @@ (define-public maxima
     (build-system gnu-build-system)
     (inputs
      (list bash-minimal
+           ecl
            gnuplot                       ;for plots
-           sbcl
            sed
            tk))                          ;Tcl/Tk is used by 'xmaxima'
     (native-inputs
@@ -5426,11 +5426,7 @@ (define-public maxima
     (arguments
      (list
       #:configure-flags
-      #~(list "--enable-sbcl"
-              (string-append "--with-sbcl=" #$sbcl "/bin/sbcl")
-              (string-append "--with-posix-shell=" #$bash-minimal "/bin/sh")
-              (string-append "--with-wish=" #$tk "/bin/wish"
-                             #$(version-major+minor (package-version tk))))
+      #~(list "--enable-ecl")
       ;; By default Maxima attempts to write temporary files to
       ;; '/tmp/nix-build-maxima-*', which won't exist at run time.
       ;; Work around that.
@@ -5457,21 +5453,28 @@ (define-public maxima
             (lambda _
               (chmod "src/maxima" #o555)))
           (replace 'check
+            ;; This is derived from the testing code in the "debian/rules" file
+            ;; of Debian's Maxima package.
+            ;; If Maxima can successfully run this, the binary to be installed
+            ;; should be fine.
             (lambda _
-              ;; This is derived from the testing code in the "debian/rules" file
-              ;; of Debian's Maxima package.
-              ;; If Maxima can successfully run this, the binary to be installed
-              ;; should be fine.
               (invoke "sh" "-c"
                       (string-append
-                       "./maxima-local "
-                       "--lisp=sbcl "
-                       "--batch-string=\"run_testsuite();\" "
-                       "| grep -q \"No unexpected errors found\""))))
+                        "./maxima-local "
+                        "--lisp=ecl "
+                        "--batch-string=\"run_testsuite();\" "
+                        "| grep -q \"No unexpected errors found\""))))
+          (add-after 'install 'install-lib
+           (lambda _
+             (let ((lib (string-append
+                          #$output "/lib/maxima/"
+                          #$(package-version this-package)
+                          "/binary-ecl")))
+                  (install-file "src/binary-ecl/maxima.fas" lib))))
           ;; Make sure the doc and emacs files are found in the
           ;; standard location.  Also configure maxima to find gnuplot
           ;; without having it on the PATH.
-          (add-after 'install 'post-install
+          (add-after 'install-lib 'post-install
             (lambda* (#:key outputs inputs #:allow-other-keys)
               (let* ((gnuplot (assoc-ref inputs "gnuplot"))
                      (out (assoc-ref outputs "out"))

base-commit: af6d567c2e5acc0c14ad5b84efbfeb94351a9553
-- 
2.48.1





This bug report was last modified 150 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.