unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Federico Beffa <beffa@ieee.org>
To: alezost@gmail.com, Guix-devel <guix-devel@gnu.org>,
	"Ludovic Courtès" <ludo@gnu.org>
Subject: [PATCH 2/6] build-system/emacs: Use "emacs" from native-inputs if specified.
Date: Fri, 20 May 2016 09:15:31 +0200	[thread overview]
Message-ID: <CAKrPhPOCzoxW4qA9WXAM7+QTjp18jUGxyaC1=7O2z73DD6GBAQ@mail.gmail.com> (raw)

Alex Kost <alezost@gmail.com> writes:

> * guix/build-system/emacs.scm (lower): Do not add "emacs" to
>   build-inputs if it is already specified in the native-inputs.
> @@ -73,8 +75,16 @@
>
>                          ;; Keep the standard inputs of 'gnu-build-system'.
>                          ,@(standard-packages)))
> -         (build-inputs `(("emacs" ,emacs)
> -                         ,@native-inputs))
> +         ;; Add emacs to build-inputs only if native-inputs do not contain
> +         ;; emacs already.  This allows us to use non-default emacs for
> +         ;; building.
> +         (build-inputs (if (find (match-lambda
> +                                   (("emacs" _ ...) #t)
> +                                   (_ #f))
> +                                 native-inputs)
> +                           native-inputs
> +                           `(("emacs" ,emacs)
> +                             ,@native-inputs)))

Note that for the interpreter we normally use a keyword, here #:emacs
(in a similar way as, say, for the python-build-system there is
#:python).  Your code overwrites its effect in a non-transparent way.

Please use the keyword in the packages where you need an emacs package
different from the default one, or remove all the code related to the
keyword.  If you opt for the second one, please be consistent and do the
same for all other build systems.

Fede

             reply	other threads:[~2016-05-20  7:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20  7:15 Federico Beffa [this message]
2016-05-20 12:00 ` [PATCH 2/6] build-system/emacs: Use "emacs" from native-inputs if specified Ludovic Courtès
2016-05-20 21:24   ` Alex Kost
2016-05-22 20:30     ` Ludovic Courtès
2016-05-20 21:37 ` Alex Kost
  -- strict thread matches above, loose matches on Subject: below --
2016-05-16 18:20 [PATCH 0/6] Modifications in building emacs packages Alex Kost
2016-05-16 18:20 ` [PATCH 2/6] build-system/emacs: Use "emacs" from native-inputs if specified Alex Kost
2016-05-19 11:54   ` Ludovic Courtès
2016-05-20 21:21     ` Alex Kost

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='CAKrPhPOCzoxW4qA9WXAM7+QTjp18jUGxyaC1=7O2z73DD6GBAQ@mail.gmail.com' \
    --to=beffa@ieee.org \
    --cc=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@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).