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:24:48 +0300 Message-ID: <871t4w1kyn.fsf@gmail.com> References: <87h9dtgcrh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3t6y-0000uB-Qn for guix-devel@gnu.org; Fri, 20 May 2016 18:41:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3rub-0007Pn-Q6 for guix-devel@gnu.org; Fri, 20 May 2016 17:24:52 -0400 In-Reply-To: <87h9dtgcrh.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 20 May 2016 14:00:34 +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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Guix-devel , Federico Beffa Ludovic Court=C3=A8s (2016-05-20 15:00 +0300) wrote: > Federico Beffa skribis: > >> 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-syst= em'. >>> ,@(standard-packages))) >>> - (build-inputs `(("emacs" ,emacs) >>> - ,@native-inputs)) >>> + ;; Add emacs to build-inputs only if native-inputs do not con= tain >>> + ;; 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. > > Seconded, I prefer #:emacs, which is consistent with cmake-build-system, > python-build-system, etc. OK, I understand. So we have to stick to a full-featured "emacs" for emacs-build-system, right? Or do you have ideas how we could use "emacs-minimal" as the default emacs for building, and replace it with the full "emacs" for particular packages? --=20 Alex