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 ms0.migadu.com with LMTPS id aPEOH9nm5mGOKgEAgWs5BA (envelope-from ) for ; Tue, 18 Jan 2022 17:12:09 +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 8LNsHNnm5mHETgEA9RJhRA (envelope-from ) for ; Tue, 18 Jan 2022 17:12:09 +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 31EA29005 for ; Tue, 18 Jan 2022 17:12:09 +0100 (CET) Received: from localhost ([::1]:38402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9r5b-0006Yy-Tp for larch@yhetil.org; Tue, 18 Jan 2022 11:12:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9qTk-0006KT-Kn for guix-devel@gnu.org; Tue, 18 Jan 2022 10:33:01 -0500 Received: from [2a0c:e300::1] (port=46654 helo=hera.aquilenet.fr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9qTi-0002aw-Gg for guix-devel@gnu.org; Tue, 18 Jan 2022 10:33:00 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id EDBF045A; Tue, 18 Jan 2022 16:32:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GgRcrsodf8mE; Tue, 18 Jan 2022 16:32:52 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 3A7C4203; Tue, 18 Jan 2022 16:32:52 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: elaexuotee@wilsonb.com Subject: Re: packages: [PoC] Expand range of objects 'add-input-label' can label References: <3J7C60ZL2GML6.2523PXP88LOT9@wilsonb.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 29 =?utf-8?Q?Niv=C3=B4se?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= 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: Tue, 18 Jan 2022 16:32:51 +0100 In-Reply-To: <3J7C60ZL2GML6.2523PXP88LOT9@wilsonb.com> (elaexuotee@wilsonb.com's message of "Mon, 17 Jan 2022 19:01:35 +0900") Message-ID: <87zgntdpp8.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / X-Rspamd-Server: hera X-Rspamd-Queue-Id: EDBF045A X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_NONE(0.00)[] X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a0c:e300::1 (failed) Received-SPF: softfail client-ip=2a0c:e300::1; envelope-from=ludo@gnu.org; helo=hera.aquilenet.fr X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" 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=1642522329; 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; bh=338RfQHZQ6KY3BMvQEE8H2o0fMyxz6ZsYr0UtgBSfIU=; b=Cs+4uHEXR7BdvnDW1pvFyCjZWfh8GcWtLunHvNIdncsPreDgVPWnx59dLHTJfC4JiOx5wr YmgrwAgC8UV8Ow2vjA0ev49a7lXqhfGKpuYgQ92e1Qp9qdvl0rO1bdKBgOxXykXS4aKPel rcGlYbbCa8SaJmg9WfNZ3FOnrqISoMsCJD0p0SvDd1DlFQM+Qy7csVdWNm4hFkv4N96ZyD kPNwK/TIayPgcH745wqjN5RMy7/fFenWyaasf/F5e9cwkOZHsyej0EmzUP6QJp9Hckdalj S1su6dHoYfO5vMdm4q3STqubKVDg0uS+1uWTGkUzKayYPWe6GIJ/9gEOagSweg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642522329; a=rsa-sha256; cv=none; b=MuEP1ibDrTN9E65R7rliO6uBd8GLWn74RNDYX/B0KXhu6MwqYLJt1idA7+g9Oe2bMoH4tL Y0E6GMEqfUNY7SON3X0hm3Suz0RY+2++Tka0+/Cg9QDGjz0T5jjo8iHD/LIa4a1otlNTpk x2jOYxlg8MJDqsbiHMkaVfm0yJoShS1Sc8i1y7JhCWHTGY1OVH852HPHa0lZ7NVoxfg8ch MSnGrykNpNFOl+L1hsv6FYPO4iAO/YeyXtbdcCMYpWrB8n+HFR4dQ/qG6Fq7j8w1WKC39z v5XqDFC/9D2DbhNiz3o4TbfbEeZvUeBh24kz5Wa+4BDKvdwdVKnE1NbqsWj/fQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.62 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 31EA29005 X-Spam-Score: -3.62 X-Migadu-Scanner: scn1.migadu.com X-TUID: RqGSUjetvzm3 Hi, elaexuotee@wilsonb.com skribis: > From 3b8e7fa8fbd58e7e164e3730c708419f612b8549 Mon Sep 17 00:00:00 2001 > From: "B. Wilson" > Date: Sun, 16 Jan 2022 23:54:51 +0900 > Subject: [PATCH 1/2] packages: Expand range of objects 'add-input-label' = can > label > To: guix-patches@gnu.org > > * guix/packages.scm (%auxiliary-files-subpath-dir): New variable. > (add-input-label): Support labels from the name property of > objects that have one. Also, name auxiliary files from their > subpath. [...] > (define (add-input-label input) > "Add an input label to INPUT." > (match input > @@ -576,7 +581,24 @@ (define (add-input-label input) > (list (package-name package) package)) > (((? package? package) output) ;XXX: ugly? > (list (package-name package) package output)) > - ((? gexp-input?) ;XXX: misplaced because 'native?' field is ig= nored? > + ((? local-file? local-file) > + (list (local-file-name local-file) local-file)) > + ((? plain-file? plain-file) > + (list (plain-file-name plain-file) plain-file)) > + ((? computed-file? computed-file) > + (list (computed-file-name computed-file) computed-file)) > + ((? program-file? program-file) > + (list (program-file-name program-file) program-file)) > + ((? scheme-file? scheme-file) > + (list (scheme-file-name scheme-file) scheme-file)) > + ((? string? path) > + (let* ((regex (string-append %auxiliary-files-subdir-path "/(.*)")) > + (match (string-match regex input))) > + `(,(if match > + (match:substring match 1) > + "_") > + ,input))) > + ((? gexp-input?) ;XXX: misplaced because 'native?' field is ign= ored? I can see why it=E2=80=99s tempting to add more labels, but the medium-term= goal is to remove labels altogether since there are other mechanisms to fill the same role: https://guix.gnu.org/en/blog/2021/the-big-change/ I would keep things as they are and instead encourage you to use gexps when you need to refer to file-like objects in packages. We=E2=80=99re still fine-tuning the idioms, so feel free to ask if you don= =E2=80=99t see how to achieve what you want. HTH! Ludo=E2=80=99.