* 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 <[email protected]> +;;; Copyright © 2016 Alex Kost <[email protected]> ;;; ;;; 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
