gnu: maxima: Update to 5.47.0.

* gnu/packages/maths.scm (maxima): Update to 5.47.0.
  [inputs]: Remove labels.
  [arguments]: Use gexps. Remove trailing booleans.
This commit is contained in:
Guillaume Le Vaillant 2023-09-04 13:42:22 +02:00
parent 2f545cbaf5
commit 17c13b4a42
No known key found for this signature in database
GPG key ID: 6BE8208ADF21FE3F

View file

@ -48,7 +48,7 @@
;;; Copyright © 2021, 2022 Paul A. Patience <paul@apatience.com> ;;; Copyright © 2021, 2022 Paul A. Patience <paul@apatience.com>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru> ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me> ;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2021, 2023 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Pierre-Antoine Bouttier <pierre-antoine.bouttier@univ-grenoble-alpes.fr> ;;; Copyright © 2021 Pierre-Antoine Bouttier <pierre-antoine.bouttier@univ-grenoble-alpes.fr>
;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com> ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2022 Sharlatan Hellseher <sharlatanus@gmail.com> ;;; Copyright © 2022 Sharlatan Hellseher <sharlatanus@gmail.com>
@ -4324,102 +4324,99 @@ (define-public gsegrafix
(define-public maxima (define-public maxima
(package (package
(name "maxima") (name "maxima")
(version "5.46.0") (version "5.47.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/maxima/Maxima-source/" (uri (string-append "mirror://sourceforge/maxima/Maxima-source/"
version "-source/" name "-" version ".tar.gz")) version "-source/" name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32 "0yhgsi7s22bpblrmrj60x0jsjdz98b5hjdcq7b0fhlzx4hdh414i"))
"01wbm8jj43p7gpdj4h55aij0b44bjydn4bwb7q1wjrfs91mz143k"))
(patches (search-patches "maxima-defsystem-mkdir.patch")))) (patches (search-patches "maxima-defsystem-mkdir.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs
`(("bash" ,bash-minimal) (list bash-minimal
("gnuplot" ,gnuplot) ;for plots gnuplot ;for plots
("sbcl" ,sbcl) sbcl
("sed" ,sed) sed
("tk" ,tk))) ;Tcl/Tk is used by 'xmaxima' tk)) ;Tcl/Tk is used by 'xmaxima'
(native-inputs (native-inputs
(list texinfo perl python)) (list texinfo perl python))
(arguments (arguments
`(#:configure-flags (list
,#~(list "--enable-sbcl" #:configure-flags
(string-append "--with-sbcl=" #$sbcl "/bin/sbcl") #~(list "--enable-sbcl"
(string-append "--with-posix-shell=" #$bash-minimal "/bin/sh") (string-append "--with-sbcl=" #$sbcl "/bin/sbcl")
(string-append "--with-wish=" #$tk "/bin/wish" (string-append "--with-posix-shell=" #$bash-minimal "/bin/sh")
#$(version-major+minor (package-version tk)))) (string-append "--with-wish=" #$tk "/bin/wish"
;; By default Maxima attempts to write temporary files to #$(version-major+minor (package-version tk))))
;; '/tmp/nix-build-maxima-*', which won't exist at run time. ;; By default Maxima attempts to write temporary files to
;; Work around that. ;; '/tmp/nix-build-maxima-*', which won't exist at run time.
#:make-flags (list "TMPDIR=/tmp") ;; Work around that.
#:phases #:make-flags #~(list "TMPDIR=/tmp")
(modify-phases %standard-phases #:phases
(add-after 'unpack 'patch-paths #~(modify-phases %standard-phases
(lambda* (#:key inputs #:allow-other-keys) (add-after 'unpack 'patch-paths
(let* ((sed (search-input-file inputs "/bin/sed")) (lambda* (#:key inputs #:allow-other-keys)
(coreutils (assoc-ref inputs "coreutils")) (let* ((sed (search-input-file inputs "/bin/sed"))
(dirname (string-append coreutils "/bin/dirname")) (coreutils (assoc-ref inputs "coreutils"))
(head (string-append coreutils "/bin/head")) (dirname (string-append coreutils "/bin/dirname"))
(perl (search-input-file inputs "/bin/perl")) (head (string-append coreutils "/bin/head"))
(python (search-input-file inputs "/bin/python3"))) (perl (search-input-file inputs "/bin/perl"))
(substitute* "src/maxima.in" (python (search-input-file inputs "/bin/python3")))
(("sed ") (string-append sed " ")) (substitute* "src/maxima.in"
(("dirname") dirname) (("sed ") (string-append sed " "))
(("head") head)) (("dirname") dirname)
(substitute* "doc/info/Makefile.in" (("head") head))
(("/usr/bin/env perl") perl)) (substitute* "doc/info/Makefile.in"
(substitute* "doc/info/build_html.sh.in" (("/usr/bin/env perl") perl))
(("python") python)) (substitute* "doc/info/build_html.sh.in"
#t))) (("python") python)))))
(add-before 'check 'pre-check (add-before 'check 'pre-check
(lambda _ (lambda _
(chmod "src/maxima" #o555) (chmod "src/maxima" #o555)))
#t)) (replace 'check
(replace 'check (lambda _
(lambda _ ;; This is derived from the testing code in the "debian/rules" file
;; This is derived from the testing code in the "debian/rules" file ;; of Debian's Maxima package.
;; of Debian's Maxima package. ;; If Maxima can successfully run this, the binary to be installed
;; If Maxima can successfully run this, the binary to be installed ;; should be fine.
;; should be fine. (invoke "sh" "-c"
(invoke "sh" "-c" (string-append
(string-append "./maxima-local "
"./maxima-local " "--lisp=sbcl "
"--lisp=sbcl " "--batch-string=\"run_testsuite();\" "
"--batch-string=\"run_testsuite();\" " "| grep -q \"No unexpected errors found\""))))
"| grep -q \"No unexpected errors found\"")))) ;; Make sure the doc and emacs files are found in the
;; Make sure the doc and emacs files are found in the ;; standard location. Also configure maxima to find gnuplot
;; standard location. Also configure maxima to find gnuplot ;; without having it on the PATH.
;; without having it on the PATH. (add-after 'install 'post-install
(add-after 'install 'post-install (lambda* (#:key outputs inputs #:allow-other-keys)
(lambda* (#:key outputs inputs #:allow-other-keys) (let* ((gnuplot (assoc-ref inputs "gnuplot"))
(let* ((gnuplot (assoc-ref inputs "gnuplot")) (out (assoc-ref outputs "out"))
(out (assoc-ref outputs "out")) (datadir (string-append out "/share/maxima/" #$version))
(datadir (string-append out "/share/maxima/" ,version)) (binutils (dirname (search-input-file inputs "/bin/as"))))
(binutils (dirname (search-input-file inputs "/bin/as")))) (with-directory-excursion out
(with-directory-excursion out (mkdir-p "share/emacs")
(mkdir-p "share/emacs") (mkdir-p "share/doc")
(mkdir-p "share/doc") (symlink
(symlink (string-append datadir "/doc/")
(string-append datadir "/doc/") (string-append out "/share/doc/maxima"))
(string-append out "/share/doc/maxima")) (with-atomic-file-replacement
(with-atomic-file-replacement (string-append datadir "/share/maxima-init.lisp")
(string-append datadir "/share/maxima-init.lisp") (lambda (in out)
(lambda (in out) (format out "~a ~s~a~%"
(format out "~a ~s~a~%" "(setf $gnuplot_command "
"(setf $gnuplot_command " (string-append gnuplot "/bin/gnuplot") ")")
(string-append gnuplot "/bin/gnuplot") ")") (dump-port in out))))
(dump-port in out)))) ;; Ensure that Maxima will have access to the GNU binutils
;; Ensure that Maxima will have access to the GNU binutils ;; components at runtime.
;; components at runtime. (wrap-program (string-append out "/bin/maxima")
(wrap-program (string-append out "/bin/maxima") `("PATH" prefix (#$binutils))))))
`("PATH" prefix (,binutils)))) ;; The Maxima command describe allows picking the relevant portions
#t)) ;; from Maximas Texinfo docs. However it does not support reading
;; The Maxima command describe allows picking the relevant portions ;; gzipped info files.
;; from Maximas Texinfo docs. However it does not support reading (delete 'compress-documentation))))
;; gzipped info files.
(delete 'compress-documentation))))
(home-page "https://maxima.sourceforge.io") (home-page "https://maxima.sourceforge.io")
(synopsis "Numeric and symbolic expression manipulation") (synopsis "Numeric and symbolic expression manipulation")
(description "Maxima is a system for the manipulation of symbolic and (description "Maxima is a system for the manipulation of symbolic and