From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH 2/6] build-system/emacs: Use "emacs" from native-inputs if specified. Date: Sat, 21 May 2016 00:37:35 +0300 Message-ID: <87wpmoza00.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3t6n-0002cl-RI for guix-devel@gnu.org; Fri, 20 May 2016 18:41:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3s72-0002GI-Mx for guix-devel@gnu.org; Fri, 20 May 2016 17:37:41 -0400 In-Reply-To: (Federico Beffa's message of "Fri, 20 May 2016 09:15:31 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Federico Beffa Cc: Guix-devel Federico Beffa (2016-05-20 10:15 +0300) wrote: > Alex Kost 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. Oh, silly me, now I understand how this keyword works, thanks a lot for the explanation! I will adjust this patchset accordingly. Please ignore the previous message I sent to this thread :-) -- Alex