unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 2/6] build-system/emacs: Use "emacs" from native-inputs if specified.
@ 2016-05-20  7:15 Federico Beffa
  2016-05-20 12:00 ` Ludovic Courtès
  2016-05-20 21:37 ` Alex Kost
  0 siblings, 2 replies; 8+ messages in thread
From: Federico Beffa @ 2016-05-20  7:15 UTC (permalink / raw)
  To: alezost, Guix-devel, Ludovic Courtès

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

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH 0/6] Modifications in building emacs packages.
@ 2016-05-16 18:20 Alex Kost
  2016-05-16 18:20 ` [PATCH 2/6] build-system/emacs: Use "emacs" from native-inputs if specified Alex Kost
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Kost @ 2016-05-16 18:20 UTC (permalink / raw)
  To: guix-devel

Hello, currently we use either 'emacs' or 'emacs-no-x' to build
(byte-compile) emacs packages.  What about making a really minimal emacs
to use for this task?

Most of the times it should be enough.  AFAICT the only case where a
full-featured emacs is needed is auctex; and for this particular case,
'emacs-build-system' uses 'emacs'.  Instead I suggest to use
'emacs-minimal' by default; and when a full 'emacs' will be needed, it
can be specified in native-inputs.  WDYT?

Another change made by this patchset is moving all "emacs" inputs to
'native-inputs'.  There is no point to use 'inputs' because this emacs
is used only to make *.elc files and to generate autoloads; you will use
emacs from your profile anyway.

[PATCH 1/6] gnu: Add emacs-minimal.
[PATCH 2/6] build-system/emacs: Use "emacs" from native-inputs if specified.
[PATCH 3/6] build-system/emacs: Use 'emacs-minimal' as default emacs for building.
[PATCH 4/6] gnu: emacs-auctex: Use 'emacs' for byte-compiling.
[PATCH 5/6] gnu: Move emacs for building from inputs to native-inputs.
[PATCH 6/6] gnu: Use 'emacs-minimal' instead of 'emacs-no-x'.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-05-22 20:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-20  7:15 [PATCH 2/6] build-system/emacs: Use "emacs" from native-inputs if specified Federico Beffa
2016-05-20 12:00 ` 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

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).