From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WOORBSqoemP51gAAbAwnHQ (envelope-from ) for ; Sun, 20 Nov 2022 23:20:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ULuKBSqoemOsDAEA9RJhRA (envelope-from ) for ; Sun, 20 Nov 2022 23:20:26 +0100 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 E49ADD092 for ; Sun, 20 Nov 2022 23:20:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owsfU-0005yk-Tv; Sun, 20 Nov 2022 17:20:05 -0500 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 1owsfR-0005yD-PX for help-guix@gnu.org; Sun, 20 Nov 2022 17:20:02 -0500 Received: from lepiller.eu ([89.234.186.109]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owsfP-0005Gs-Mh for help-guix@gnu.org; Sun, 20 Nov 2022 17:20:01 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 52489528; Sun, 20 Nov 2022 22:19:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=k5gICq/+y7af Q6M1i3ttTYkDHWyAuHJsrPXge58Bt7w=; b=cqYNqNCV9LM8KivnImilWz+rlBOR h8kgBiKYYeejP0SwsjpXsQ7KlXKZCtzCj93KBakErZ7zWVKYK+yCme4kD2EO8rjj YY700EYv4qaYG6MJLg+Ct6rrDpMibVGoWjId1/nz0PphuabcqoOIfXjj7sNNVwIO ZMiDAsD30YBSUqMT64uTBDwIxMJlHSQpP20gIopzurKis/P9VsED8twSu3UzyVPo jgpn0n+fzncoJxvE5WYtf+sRE3FOXU7ycmbU2CDD5yBbuBdE1iqyfZRry5ZhwuDh YI9Rnl33hwV3/RmTGTgu3LdH+HTgTmQSRt8gAD5haiJphmB5tkf793CRaQ== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 8292227c (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sun, 20 Nov 2022 22:19:52 +0000 (UTC) Date: Sun, 20 Nov 2022 23:19:51 +0100 From: Julien Lepiller To: jgart Cc: Guix Help Subject: Re: What passes in the inputs to the lambda? Message-ID: <20221120231951.52063cb0@sybil.lepiller.eu> In-Reply-To: <20221120151009.GB25110@dismail.de> References: <20221120151009.GB25110@dismail.de> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=89.234.186.109; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668982825; 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=wfgtmFViMY5z/y7B4w5nxAds3I9aHiiCpe9a9mpYrcE=; b=meZDCxqTszQ+4dqiLFgf3X4FZElQ/R/6DdvUf08kS1DU7BiiLn02WVguzx4LpGlijokPtb mbvlZRmanzIXRLSHMXfOu93sXXgrorkWWVwY2NJHFNtOZxN6/CUrLUG8cNzsBPqyjgC7I9 ZzPFGmUEf6CYGrA1gqTvfeQySqcRndxQWZ23nApEfAcaQmERu5bZQWU4QVJKUQxWhmgDUc VUIaCPqJk/BQWttLPSIHpI6Y9+oA0qsV35RNDpXBgMxDu1EkBbgtgG4GiYOUVvM7qpDPYx yb3L+0232b7GcuWt7IP+dH2mswoQMDkYypDKRqIvMpBCgOatDv66CP8ZKBMvwA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668982825; a=rsa-sha256; cv=none; b=cEuvY9vnWzoFLZ79TZfSd1P+nk7SkQZgSeZKkgtJYzXNtRD9UFKBDMr7l70XYMzMohUaQC RxiLRwx0oL/LqKgGE9MlyJ05zwkE1BPI0yutGMNOgS0s2o+Uzgmu9u9k6JQAIz1cj+jN1Y RFzo6cQw/9d0u7qwIS0qxIbzjXfjayl5mnEmyBLSHCy28CiDaQLcM1Y6TwMQhWpZYB066l XAoFjIftkZxXAWbZpHbaSPtlIdbK8psFTd34Z9tSfPLgtxwqlpN4J1gpBbGiztH37K8n/v 5TgoH/puYS2paf4wDMQ2CDibobceDzveuCjj0iY3H3lAHXDSVVEmJW0sJF1r9g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=cqYNqNCV; dmarc=pass (policy=none) header.from=lepiller.eu; 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" X-Migadu-Spam-Score: -3.01 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=cqYNqNCV; dmarc=pass (policy=none) header.from=lepiller.eu; 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" X-Migadu-Queue-Id: E49ADD092 X-Spam-Score: -3.01 X-Migadu-Scanner: scn1.migadu.com X-TUID: xQdtUODj4HWj Le Sun, 20 Nov 2022 15:10:09 -0600, jgart a =C3=A9crit : > In the following snippet, what passes in the inputs to the lambda? >=20 > (modify-phases %standard-phases > (replace 'unpack > (lambda* (#:key inputs #:allow-other-keys) > (let* ((source (assoc-ref inputs "source")) > (guile-dir (assoc-ref inputs "guile")) > (guile (string-append guile-dir "/bin/guile"))) > (invoke guile "--no-auto-compile" source) > (chdir "bootar")))) >=20 The lambda you're talking about is a build phase of some package. These phases are passed in order to the build system's build procedure. The exact arguments passed to this lambda therefore depend on the way the build procedure calls the phases. For instance, we see this in the gnu-build-system: (define* (gnu-build name inputs #:key [...]) [...] #~(gnu-build #:source source [...])) This inner gnu-build is actually a reference to the build side's gnu-build, not the host side (because it's gquoted (if that's a word :p)), and it's defined in (guix build gnu-build-system): (define* (gnu-build #:key [...] #:rest args) [...]) It calls the phases with this: (apply proc args) where proc is the phase (in this case, your lambda) and args is the rest of keyword arguments that the definition of gnu-build captured. HTH!