On Thu, Sep 25, 2014 at 9:12 PM, Ludovic Courtès wrote: > Federico Beffa skribis: > >> I've found that the doc and emacs ".el" files were not installed in >> the right place. Also >> I've worked out how to set the full gnuplot path in the default >> startup configuration file. >> Now plotting works without the user having to install gnuplot in his profile. > > Nice. > >> From ab8a0e9f8f50370b4e9e7ca63d8bef1408a05da6 Mon Sep 17 00:00:00 2001 >> From: Federico Beffa >> Date: Thu, 25 Sep 2014 17:04:13 +0200 >> Subject: [PATCH] maxima: Fix default gnuplot path, doc and emacs location >> >> * gnu/packages/maths.scm(maxima): Configure the default gnuplot path. Make doc and >> emacs files reachable from their expected standard location. > > Should be something like: > > * gnu/packages/maths.scm (maxima): Remove Tcl from 'inputs'. Add > 'post-install' phase. > > The idea is that it’s just a “conceptual undo list”, as the GCS calls it. > >> + ;; 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"))) > > Since $out/share/maxima/$version is used a lot, please change the ‘let’ > to: > > (let* ((gnuplot (assoc-ref inputs "gnuplot")) > (out (assoc-ref outputs "out")) > (datadir (string-append out "/share/maxima/" ,version))) > > and then use ‘datadir’. > OK, makes sense. >> + (with-directory-excursion out >> + (mkdir-p "share/emacs") >> + (mkdir-p "share/doc") >> + (symlink >> + (string-append out "/share/maxima/" ,version "/emacs/") >> + (string-append out "/share/emacs/site-lisp")) >> + (symlink > > The second ‘symlink’ call should be aligned with the first one. > >> + (string-append out "/share/maxima/" ,version "/doc/") >> + (string-append out "/share/doc/maxima")) >> + (with-atomic-file-replacement >> + (string-append out "/share/maxima/" >> + ,version "/share/maxima-init.lisp") >> + (lambda (in out) >> + (begin > > ‘begin’ is unnecessary here. > >> - (license license:gpl2))) >> + (license license:gpl2))) > > Whitespace change? yes. > > Could you send an updated patch? > > Thanks in advance, > Ludo’. Please find attached the updated patch. Regards, Fede