Archived
1
0
Fork 0

gnu: maxima: Ensure binutils are available at runtime.

* gnu/packages/maths.scm (maxima)[arguments]: Use modify-phases syntax.
Modify 'post-install' phase.
This commit is contained in:
Kei Kebreau 2017-07-08 18:57:15 -04:00
parent 6b2eafaaa8
commit 0093b1262b
No known key found for this signature in database
GPG key ID: E6A5EE3C19467A0D

View file

@ -2097,36 +2097,43 @@ to BMP, JPEG or PNG image formats.")
;; '/tmp/nix-build-maxima-*', which won't exist at run time. ;; '/tmp/nix-build-maxima-*', which won't exist at run time.
;; Work around that. ;; Work around that.
#:make-flags (list "TMPDIR=/tmp") #:make-flags (list "TMPDIR=/tmp")
#:phases (alist-cons-before #:phases
'check 'pre-check (modify-phases %standard-phases
(lambda _ (add-before 'check 'pre-check
(chmod "src/maxima" #o555)) (lambda _
;; Make sure the doc and emacs files are found in the (chmod "src/maxima" #o555)
;; standard location. Also configure maxima to find gnuplot #t))
;; without having it on the PATH. ;; Make sure the doc and emacs files are found in the
(alist-cons-after ;; standard location. Also configure maxima to find gnuplot
'install 'post-install ;; without having it on the PATH.
(lambda* (#:key outputs inputs #:allow-other-keys) (add-after 'install 'post-install
(let* ((gnuplot (assoc-ref inputs "gnuplot")) (lambda* (#:key outputs inputs #:allow-other-keys)
(out (assoc-ref outputs "out")) (let* ((gnuplot (assoc-ref inputs "gnuplot"))
(datadir (string-append out "/share/maxima/" ,version))) (out (assoc-ref outputs "out"))
(with-directory-excursion out (datadir (string-append out "/share/maxima/" ,version))
(mkdir-p "share/emacs") (binutils (string-append (assoc-ref inputs "binutils")
(mkdir-p "share/doc") "/bin")))
(symlink (with-directory-excursion out
(string-append datadir "/emacs/") (mkdir-p "share/emacs")
(string-append out "/share/emacs/site-lisp")) (mkdir-p "share/doc")
(symlink (symlink
(string-append datadir "/doc/") (string-append datadir "/emacs/")
(string-append out "/share/doc/maxima")) (string-append out "/share/emacs/site-lisp"))
(with-atomic-file-replacement (symlink
(string-append datadir "/share/maxima-init.lisp") (string-append datadir "/doc/")
(lambda (in out) (string-append out "/share/doc/maxima"))
(format out "~a ~s~a~%" (with-atomic-file-replacement
"(setf $gnuplot_command " (string-append datadir "/share/maxima-init.lisp")
(string-append gnuplot "/bin/gnuplot") ")") (lambda (in out)
(dump-port in out)))))) (format out "~a ~s~a~%"
%standard-phases)))) "(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") (home-page "http://maxima.sourceforge.net")
(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