aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
authorKei Kebreau <kei@openmailbox.org>2017-07-08 18:57:15 -0400
committerKei Kebreau <kei@openmailbox.org>2017-07-25 07:58:55 -0400
commit0093b1262b1af6b66cf255112bdad7ed6f8f08e3 (patch)
treece9a8518ce178b33ff77a782f46b8eefb1e2ad14 /gnu/packages/maths.scm
parent6b2eafaaa81cddc66c128a0aeeee99ed33cfb4ca (diff)
downloadguix-0093b1262b1af6b66cf255112bdad7ed6f8f08e3.tar
guix-0093b1262b1af6b66cf255112bdad7ed6f8f08e3.tar.gz
gnu: maxima: Ensure binutils are available at runtime.
* gnu/packages/maths.scm (maxima)[arguments]: Use modify-phases syntax. Modify 'post-install' phase.
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm67
1 files changed, 37 insertions, 30 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 91a092d569..287710d4fc 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2097,36 +2097,43 @@ to BMP, JPEG or PNG image formats.")
;; '/tmp/nix-build-maxima-*', which won't exist at run time.
;; Work around that.
#:make-flags (list "TMPDIR=/tmp")
- #:phases (alist-cons-before
- 'check 'pre-check
- (lambda _
- (chmod "src/maxima" #o555))
- ;; 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.
- (alist-cons-after
- 'install 'post-install
- (lambda* (#:key outputs inputs #:allow-other-keys)
- (let* ((gnuplot (assoc-ref inputs "gnuplot"))
- (out (assoc-ref outputs "out"))
- (datadir (string-append out "/share/maxima/" ,version)))
- (with-directory-excursion out
- (mkdir-p "share/emacs")
- (mkdir-p "share/doc")
- (symlink
- (string-append datadir "/emacs/")
- (string-append out "/share/emacs/site-lisp"))
- (symlink
- (string-append datadir "/doc/")
- (string-append out "/share/doc/maxima"))
- (with-atomic-file-replacement
- (string-append datadir "/share/maxima-init.lisp")
- (lambda (in out)
- (format out "~a ~s~a~%"
- "(setf $gnuplot_command "
- (string-append gnuplot "/bin/gnuplot") ")")
- (dump-port in out))))))
- %standard-phases))))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ (chmod "src/maxima" #o555)
+ #t))
+ ;; 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
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let* ((gnuplot (assoc-ref inputs "gnuplot"))
+ (out (assoc-ref outputs "out"))
+ (datadir (string-append out "/share/maxima/" ,version))
+ (binutils (string-append (assoc-ref inputs "binutils")
+ "/bin")))
+ (with-directory-excursion out
+ (mkdir-p "share/emacs")
+ (mkdir-p "share/doc")
+ (symlink
+ (string-append datadir "/emacs/")
+ (string-append out "/share/emacs/site-lisp"))
+ (symlink
+ (string-append datadir "/doc/")
+ (string-append out "/share/doc/maxima"))
+ (with-atomic-file-replacement
+ (string-append datadir "/share/maxima-init.lisp")
+ (lambda (in out)
+ (format out "~a ~s~a~%"
+ "(setf $gnuplot_command "
+ (string-append gnuplot "/bin/gnuplot") ")")
+ (dump-port in out))))
+ ;; Ensure that Maxima will have access to the GNU binutils
+ ;; components at runtime.
+ (wrap-program (string-append out "/bin/maxima")
+ `("PATH" prefix (,binutils))))
+ #t)))))
(home-page "http://maxima.sourceforge.net")
(synopsis "Numeric and symbolic expression manipulation")
(description "Maxima is a system for the manipulation of symbolic and