From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +LEzE/fsHWPwIAAAbAwnHQ (envelope-from ) for ; Sun, 11 Sep 2022 16:13:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 6Kg0EvfsHWMIYwAAG6o9tA (envelope-from ) for ; Sun, 11 Sep 2022 16:13:11 +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 1697618D07 for ; Sun, 11 Sep 2022 16:13:10 +0200 (CEST) Received: from localhost ([::1]:56074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXNht-0001NB-VU for larch@yhetil.org; Sun, 11 Sep 2022 10:13:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXNhn-0001Mk-82 for guix-patches@gnu.org; Sun, 11 Sep 2022 10:13:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54360) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oXNhm-0002jv-Tu for guix-patches@gnu.org; Sun, 11 Sep 2022 10:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oXNhm-0000lB-8u for guix-patches@gnu.org; Sun, 11 Sep 2022 10:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57717] [DRAFT PATCH core-updates] build-systems: Pass #:allowed-references and #:disallowed-references to builders. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Sep 2022 14:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57717 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Marius Bakke Cc: 57717@debbugs.gnu.org Received: via spool by 57717-submit@debbugs.gnu.org id=B57717.16629055742901 (code B ref 57717); Sun, 11 Sep 2022 14:13:02 +0000 Received: (at 57717) by debbugs.gnu.org; 11 Sep 2022 14:12:54 +0000 Received: from localhost ([127.0.0.1]:43059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXNhe-0000kj-2n for submit@debbugs.gnu.org; Sun, 11 Sep 2022 10:12:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXNhc-0000kR-ES for 57717@debbugs.gnu.org; Sun, 11 Sep 2022 10:12:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44970) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXNhX-0002dB-8a for 57717@debbugs.gnu.org; Sun, 11 Sep 2022 10:12:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=MR1zo65SGFyuaZG6xO7/oDMPU3pohVWVDs5tKjzqm7M=; b=DUI+08UUNk0hu+KBnG5n VJ4yb0xQNWhNoAaP2SCbo1Skm761xdizZLsnO06n9ELsH+oYWkp4JviKtWClwDacMMGAO9VVCC/79 mYNUUxfLnaxef6UDSJ84DZHUnZw7yoLjtyxFVvbzILZcM4rI/aFYIoUPnooXa89pK9OlEzboTQZes KDGVi+tpHXhH4b1ck6tRRLr8M2dNqCiHcab+BHyWlsh+9yMcUgS2n0GoRI9W7q5G3nnO3GZ/uLr0j yBbRleeWqCaZ7tQ1CUxjiM1GRfPw0zr3K+R3tex4Q4RJAH+qRBQaKmfvDAfivtxh2/qaxJvSjMKOC n1ymVCuTON/RZw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51204 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXNhW-0003Mp-RG; Sun, 11 Sep 2022 10:12:47 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220910152604.3459-1-marius@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 25 Fructidor an 230 de la =?UTF-8?Q?R=C3=A9volution, ?= jour de =?UTF-8?Q?l'=C3=89crevisse?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 11 Sep 2022 16:12:44 +0200 In-Reply-To: <20220910152604.3459-1-marius@gnu.org> (Marius Bakke's message of "Sat, 10 Sep 2022 17:26:04 +0200") Message-ID: <87bkrmyp7n.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662905591; 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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=MR1zo65SGFyuaZG6xO7/oDMPU3pohVWVDs5tKjzqm7M=; b=TqOFsGUWZkGh5uNVf/er0tiRBzOisnsTVUqWW7vd8BwmaqsXumTtBTfGjMnF4qSEa1F23Z IgoQChxMlmIM9PV0zbYFPmXux6C9BtbrcYo08wtOpN7FNNXBNBa7UfGFVD5m8sQLe8PuC8 dtefLN6LDDPypY5AyLX24bAiNjfgTcVduNYizR58MI/jDwI4phjBIGHv0pio7q9UrGu3BX gjFjqe02WZlMU1i0CnqJ/eGWiIbd144g4q4P6C4BVyFdI1DLmKzxsU7PSByol950VNEthx +5uGAB9AuL56OkeXaf49wAaWjRpgWK23Ze+eceRwEayMr4BZoV0UgFjq6eoeOQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662905591; a=rsa-sha256; cv=none; b=lRmr7T6LQ7CuWquZ6m/223QAOhgHkVRyx622syJPEbJs4HeVoEZ8MkTVdD1whRjN+1kwvD 1i8N1LkCLnPEK4quzMbBjBu6RuizTgryZBCN+z20VazBn3w1QwlBOfFpUJslrp/jYEZIK/ nSpH6XkiDSvoCVN1YTqs17qgURTgeGJAvTMGdoblmMSfv3bJAmc8fU4jzTEXmtdi313ksR jSwrqVFch9xckzTVBHzZaYAUGq6GGjp/0etJjjvNDqCX2epXLGevR55GO0r7/hrcyw32w8 SZ8v8EM6EBssgmiJHesApgXWRFeg7abSqEP1wJblgRTRIJ84lD+WYzIUo7LxUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=DUI+08UU; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.20 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=DUI+08UU; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1697618D07 X-Spam-Score: -2.20 X-Migadu-Scanner: scn1.migadu.com X-TUID: nEdLNV1g7icb Hi, Marius Bakke skribis: > * guix/build-system/gnu.scm (gnu-build, gnu-cross-build)[builder]: Pass > along #:allowed-references and #:disallowed-references. > * guix/build-system/meson.scm (meson-build, meson-cross-build)[builder]: = Likewise. > --- > Hello Guix, > > This is an untested patch that makes #:allowed-references > and #:disallowed-references available to build-side code. > > The intention is to make it easier to use these properties directly when > e.g. wrapping. Consider the following: > > (arguments > (list > #:disallowed-references (list (gexp-input glib "bin") > (gexp-input inkscape/stable)) > #:phases > #~(modify-phases %standard-phases > (replace 'glib-or-gtk-wrap > (let ((wrap (assoc-ref %standard-phases 'glib-or-gtk-wrap))) > (lambda* (#:key inputs outputs disallowed-references > #:allow-other-keys) > (wrap #:inputs (filter (match-lambda > ((label . output) > (not (member output > disallowed-refere= nces)))) > inputs) > #:outputs outputs))))))) > > > This way we don't have to build the list of disallowed references twice, > which is difficult without labels in the case of e.g. `(,glib "bin"). Why not. The only possible drawback I can think of is that it could hide errors: since things listed in #:disallowed-references are automatically removed from wrappers, you could end up successfully building a wrapper that lacks items without noticing. But yeah, maybe that=E2=80=99s a questionable scenario. > + #:allowed-references #$allowed-references > + #:disallowed-references #$disallowed-referenc= es Maxime raised a good point on this one, but I think you can write: #:disallowed-references '#$disallowed-references This will work whether =E2=80=98disallowed-references=E2=80=99 is #f or a l= ist. Thanks! Ludo=E2=80=99.