mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: maxima: Install .el files in the right place, and help find Gnuplot.
* gnu/packages/maths.scm (maxima): Remove Tcl from 'inputs'. Add 'post-install' phase. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
dd0b0e681b
commit
f36afe4d05
1 changed files with 28 additions and 7 deletions
|
@ -850,8 +850,7 @@ (define-public maxima
|
||||||
(inputs
|
(inputs
|
||||||
`(("gcl" ,gcl)
|
`(("gcl" ,gcl)
|
||||||
("gnuplot" ,gnuplot) ;for plots
|
("gnuplot" ,gnuplot) ;for plots
|
||||||
("tcl" ,tcl) ;Tcl/Tk is used by 'xmaxima'
|
("tk" ,tk))) ;Tcl/Tk is used by 'xmaxima'
|
||||||
("tk" ,tk)))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("texinfo" ,texinfo)
|
`(("texinfo" ,texinfo)
|
||||||
("perl" ,perl)))
|
("perl" ,perl)))
|
||||||
|
@ -866,18 +865,40 @@ (define-public maxima
|
||||||
"/bin/wish"
|
"/bin/wish"
|
||||||
(let ((v ,(package-version tk)))
|
(let ((v ,(package-version tk)))
|
||||||
(string-take v (string-index-right v #\.)))))
|
(string-take v (string-index-right v #\.)))))
|
||||||
|
|
||||||
;; By default Maxima attempts to write temporary files to
|
;; By default Maxima attempts to write temporary files to
|
||||||
;; '/tmp/nix-build-maxima-5.34.1', which doesn't exist. Work around
|
;; '/tmp/nix-build-maxima-5.34.1', which doesn't exist. Work around
|
||||||
;; that.
|
;; that.
|
||||||
#:make-flags (list "TMPDIR=/tmp")
|
#:make-flags (list "TMPDIR=/tmp")
|
||||||
|
|
||||||
#:phases (alist-cons-before
|
#:phases (alist-cons-before
|
||||||
'check 'pre-check
|
'check 'pre-check
|
||||||
(lambda _
|
(lambda _
|
||||||
(chmod "src/maxima" #o555))
|
(chmod "src/maxima" #o555))
|
||||||
%standard-phases)))
|
;; 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))))
|
||||||
(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
|
||||||
|
@ -889,4 +910,4 @@ (define-public maxima
|
||||||
;; version (which implicitly means gpl1+).
|
;; version (which implicitly means gpl1+).
|
||||||
;; At least one file (src/maxima.asd) says "version 2."
|
;; At least one file (src/maxima.asd) says "version 2."
|
||||||
;; GPLv2 only is therefore the smallest subset.
|
;; GPLv2 only is therefore the smallest subset.
|
||||||
(license license:gpl2)))
|
(license license:gpl2)))
|
||||||
|
|
Loading…
Reference in a new issue