From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SIIuJYVpFGXNagEAG6o9tA:P1 (envelope-from ) for ; Wed, 27 Sep 2023 19:42:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SIIuJYVpFGXNagEAG6o9tA (envelope-from ) for ; Wed, 27 Sep 2023 19:42:29 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2F34C57EE4 for ; Wed, 27 Sep 2023 19:42:29 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=landt.email header.s=MBO0001 header.b=k3jlGxf4; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=landt.email ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695836549; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=I/P/9ptnxO3kA4puAhUusbNX25lza7aeAcTYl3JDinw=; b=MBfEZLR0MEwmR+znc75OBraJuurtxOZ13os+5tdeXUGLgNA1dpvwiTCttzuzJkZhI4dnn4 NxGnBUzuzsf+pue/81vU31pl2AiQAXAjcwjaVBoiQYYbUsGLG1UCwa6JjsWUD3h2wuIvZe A4wdx7S16+pB0CDjcc6YyObXmUZiiWXFEmaf4iDXGW/3G7njLoaBTk+2J3i8qiSqHAk519 R7kA3rpUQf8VT+F1hjv90L2EqNdJvG8DYscvPAdSoxHFGwoSOKG+A1l1ipK1d75nU5MYDy i+XqdoaKUzSV3rznjViBIQvz9QF+kzwhE/epWpvK2i+V5Tk7+ljWMyHFSH6IvA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=landt.email header.s=MBO0001 header.b=k3jlGxf4; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=landt.email ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695836549; a=rsa-sha256; cv=none; b=CnGL6xRgxG52OYwvic+0O5SDqhutmZw19QEPDM7xjpCGkBZ2ejT2u88MfpdL4+P14gslsZ H1iEfUkS9PmkML7pVmGrgF2/I2PWpOo5e53nn86gngyPOGUhyhkn41KQxXmbStM0PRQB6M oXGih3D7ftNWma8HWSusmx90L8fQvTWWqUgHNwbcg8q5rMxQbAMHxAes0qgPamdp9zOpWD YZzhLVNWLcqOkCv7/dWmDwwGGmtO1OitxQKTxCpwf061/VgaVWUjWZb4SGeVLBQ8clSIuo dv54HNohwZPgOUrEnKP/8BxMUPm8kxoBJU4dCVRFlL/pB0doJGVMNtHikM0WNA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qlYXw-0006DG-CU; Wed, 27 Sep 2023 13:42:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qlYXl-0006BX-Nh for help-guix@gnu.org; Wed, 27 Sep 2023 13:41:51 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1qlYXj-0004tg-33 for help-guix@gnu.org; Wed, 27 Sep 2023 13:41:49 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4RwkSM6SBPz9sV6; Wed, 27 Sep 2023 19:41:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landt.email; s=MBO0001; t=1695836499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I/P/9ptnxO3kA4puAhUusbNX25lza7aeAcTYl3JDinw=; b=k3jlGxf4x+3czFXygBMO3/e306ZaKefz7KUkGoDrWIyRsFRzqEYAY59dt0xG65s27AyIN+ P7dkvx6TaMqkuyAz9usiDJmGjW8rQoOaVt/sgxUQUpl6bHes1Tzf2homLh0N1+4XYCjGb6 E+/PskMAioVwG5Ol1EkvD6SjT1hDNDFD+R9w1UEDPkYndvy1o6lb9z+ZeOg67/dMjQajLK WbsJrTsBW6CLrpTsMNGnq6VOV998laIREl+1ZR3aqhAGrmGx0qUGIkyaEckVO+1Je4QoC2 iH73DSeCSM6TuktHHjYHXmEAZhtg+zfOVDbcW1K76l1g+AM6aVRBxe9JficqcA== Date: Wed, 27 Sep 2023 19:41:39 +0200 (CEST) From: nils@landt.email To: Hilton Chain Cc: help-guix@gnu.org Message-ID: <1492434323.444889.1695836499300@office.mailbox.org> In-Reply-To: <87pm23r9ep.wl-hako@ultrarare.space> References: <2042058673.297636.1695726486678@office.mailbox.org> <87pm23r9ep.wl-hako@ultrarare.space> Subject: Re: Recursive substitute-keyword-arguments / setting default on build system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal Received-SPF: pass client-ip=80.241.56.161; envelope-from=nils@landt.email; helo=mout-p-103.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.50 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: 2F34C57EE4 X-Spam-Score: -7.50 X-TUID: I/n72MlgopYS > Hilton Chain hat am 27.09.2023 16:13 CEST geschrieben: > > > Hi Nils, > > On Tue, 26 Sep 2023 19:08:06 +0800, > nils@landt.email wrote: > > > > Hello, > > > > I use a slightly customized emacs package, and want to use it as the package that is used in emacs-build-system for the emacs plugins I'm using. > > The default emacs gets garbage collected and takes quite a while to reinstall, I would like to avoid that. Also, it seems cleaner to build the plugins with the exact version that they will be used with. > > > > Here's what I have: > > > > (define emacs-package > > ((const > > ((options->transformation > > '((with-configure-flag . "emacs=--program-transform-name='s/^ctags$/ctags.emacs/'"))) > > emacs)))) > > > > (define (set-build-system-emacs plugin-package) > > (package > > (inherit plugin-package) > > (arguments > > (substitute-keyword-arguments (package-arguments plugin-package) > > ((#:emacs emacs) `,emacs-package))))) > > > > (map set-build-system-emacs package-list) > > > > From what I can tell this does work for the packages in package-list, but not for any inputs to those packages. That makes total sense to me, but I don't know how to solve it. > > Any pointers? Or is it possible to set the default package for a build system, removing the need for this mapping altogether? > > `package-input-rewriting' (documented in [1]) can be used for the > purpose: > > --8<---------------cut here---------------start------------->8--- > (map (package-input-rewriting > `((,emacs-minimal . ,emacs-package) > (,emacs . ,emacs-package))) > package-list) > --8<---------------cut here---------------end--------------->8--- > > Thanks > --- > [1]: https://guix.gnu.org/en/manual/devel/en/html_node/Defining-Package-Variants.html Thank you for the reply. I was already using package-input-rewriting (well, the /spec version of it) but supplemented it with the keyword argument substitution because I thought it only worked on the inputs / native-inputs / propagated-inputs fields. But you are right, just the input-rewriting works!