unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Federico Beffa <beffa@ieee.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu packages maxima: Update to 5.34.1 and fix dependencies
Date: Thu, 25 Sep 2014 21:12:21 +0200	[thread overview]
Message-ID: <87eguzecq2.fsf@gnu.org> (raw)
In-Reply-To: <CAKrPhPMHFALKyMt=RgA0ChR3DaWdzHYBorK1qZejSgKBBDPdqQ@mail.gmail.com> (Federico Beffa's message of "Thu, 25 Sep 2014 19:01:26 +0200")

Federico Beffa <beffa@ieee.org> 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 <beffa@fbengineering.ch>
> 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’.

> +                      (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?

Could you send an updated patch?

Thanks in advance,
Ludo’.

  reply	other threads:[~2014-09-25 19:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23 16:18 [PATCH] gnu packages maxima: Update to 5.34.1 and fix dependencies Federico Beffa
2014-09-24  7:45 ` Ludovic Courtès
2014-09-25 17:01   ` Federico Beffa
2014-09-25 19:12     ` Ludovic Courtès [this message]
2014-09-26 16:59       ` Federico Beffa
2014-09-27  9:24         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eguzecq2.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=beffa@ieee.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).