gnu: maxima: Ensure gcc is available at runtime.
* gnu/packages/maths.scm (maxima)[inputs]: Add gcc. [arguments]: Use modify-phases syntax. Add 'set-gcc-path' phase.
This commit is contained in:
parent
0ca1e77c14
commit
f2fa86cc82
|
@ -2074,7 +2074,8 @@ to BMP, JPEG or PNG image formats.")
|
||||||
(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
|
||||||
`(("gcl" ,gcl)
|
`(("gcc" ,gcc)
|
||||||
|
("gcl" ,gcl)
|
||||||
("gnuplot" ,gnuplot) ;for plots
|
("gnuplot" ,gnuplot) ;for plots
|
||||||
("tk" ,tk))) ;Tcl/Tk is used by 'xmaxima'
|
("tk" ,tk))) ;Tcl/Tk is used by 'xmaxima'
|
||||||
(native-inputs
|
(native-inputs
|
||||||
|
@ -2096,36 +2097,44 @@ 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 'configure 'set-gcc-path
|
||||||
(chmod "src/maxima" #o555))
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; Make sure the doc and emacs files are found in the
|
(substitute* "lisp-utils/defsystem.lisp"
|
||||||
;; standard location. Also configure maxima to find gnuplot
|
(("\\(defparameter \\*c-compiler\\* \"gcc\"\\)")
|
||||||
;; without having it on the PATH.
|
(string-append "(defparameter *c-compiler* \""
|
||||||
(alist-cons-after
|
(assoc-ref inputs "gcc") "/bin/gcc\")")))
|
||||||
'install 'post-install
|
#t))
|
||||||
(lambda* (#:key outputs inputs #:allow-other-keys)
|
(add-before 'check 'pre-check
|
||||||
(let* ((gnuplot (assoc-ref inputs "gnuplot"))
|
(lambda _
|
||||||
(out (assoc-ref outputs "out"))
|
(chmod "src/maxima" #o555)
|
||||||
(datadir (string-append out "/share/maxima/" ,version)))
|
#t))
|
||||||
(with-directory-excursion out
|
;; Make sure the doc and emacs files are found in the
|
||||||
(mkdir-p "share/emacs")
|
;; standard location. Also configure maxima to find gnuplot
|
||||||
(mkdir-p "share/doc")
|
;; without having it on the PATH.
|
||||||
(symlink
|
(add-after 'install 'post-install
|
||||||
(string-append datadir "/emacs/")
|
(lambda* (#:key outputs inputs #:allow-other-keys)
|
||||||
(string-append out "/share/emacs/site-lisp"))
|
(let* ((gnuplot (assoc-ref inputs "gnuplot"))
|
||||||
(symlink
|
(out (assoc-ref outputs "out"))
|
||||||
(string-append datadir "/doc/")
|
(datadir (string-append out "/share/maxima/" ,version)))
|
||||||
(string-append out "/share/doc/maxima"))
|
(with-directory-excursion out
|
||||||
(with-atomic-file-replacement
|
(mkdir-p "share/emacs")
|
||||||
(string-append datadir "/share/maxima-init.lisp")
|
(mkdir-p "share/doc")
|
||||||
(lambda (in out)
|
(symlink
|
||||||
(format out "~a ~s~a~%"
|
(string-append datadir "/emacs/")
|
||||||
"(setf $gnuplot_command "
|
(string-append out "/share/emacs/site-lisp"))
|
||||||
(string-append gnuplot "/bin/gnuplot") ")")
|
(symlink
|
||||||
(dump-port in out))))))
|
(string-append datadir "/doc/")
|
||||||
%standard-phases))))
|
(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)))))
|
||||||
|
#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
|
||||||
|
|
Loading…
Reference in New Issue