[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/6] build-system/emacs: Use "emacs" from native-inputs if specif
From: |
Alex Kost |
Subject: |
[PATCH 2/6] build-system/emacs: Use "emacs" from native-inputs if specified. |
Date: |
Mon, 16 May 2016 21:20:20 +0300 |
* guix/build-system/emacs.scm (lower): Do not add "emacs" to
build-inputs if it is already specified in the native-inputs.
---
guix/build-system/emacs.scm | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
index 03c1eb2..017e6ef 100644
--- a/guix/build-system/emacs.scm
+++ b/guix/build-system/emacs.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Federico Beffa <address@hidden>
+;;; Copyright © 2016 Alex Kost <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -25,6 +26,7 @@
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
#:use-module (ice-9 match)
+ #:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (%emacs-build-system-modules
emacs-build
@@ -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)))
(outputs outputs)
(build emacs-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
--
2.7.3
- [PATCH 0/6] Modifications in building emacs packages., Alex Kost, 2016/05/16
- [PATCH 4/6] gnu: emacs-auctex: Use 'emacs' for byte-compiling., Alex Kost, 2016/05/16
- [PATCH 5/6] gnu: Move emacs for building from inputs to native-inputs., Alex Kost, 2016/05/16
- [PATCH 2/6] build-system/emacs: Use "emacs" from native-inputs if specified.,
Alex Kost <=
- [PATCH 6/6] gnu: Use 'emacs-minimal' instead of 'emacs-no-x'., Alex Kost, 2016/05/16
- [PATCH 3/6] build-system/emacs: Use 'emacs-minimal' as default emacs for building., Alex Kost, 2016/05/16
- [PATCH 1/6] gnu: Add emacs-minimal., Alex Kost, 2016/05/16