From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yBgWBGooZGICcgEAbAwnHQ (envelope-from ) for ; Sat, 23 Apr 2022 18:25:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id uK1KBGooZGKaMQAA9RJhRA (envelope-from ) for ; Sat, 23 Apr 2022 18:25:14 +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 C4313303F2 for ; Sat, 23 Apr 2022 18:25:13 +0200 (CEST) Received: from localhost ([::1]:60908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niIZM-0003VD-Ap for larch@yhetil.org; Sat, 23 Apr 2022 12:25:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niIZD-0003Uu-9R for bug-guix@gnu.org; Sat, 23 Apr 2022 12:25:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34963) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niIZD-0002KO-03 for bug-guix@gnu.org; Sat, 23 Apr 2022 12:25:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1niIZC-0003mX-Ss for bug-guix@gnu.org; Sat, 23 Apr 2022 12:25:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors References: <20200702120029.vglwgexyasdzhgll@gravity> In-Reply-To: <20200702120029.vglwgexyasdzhgll@gravity> Resent-From: Brian Cully Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 23 Apr 2022 16:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42164 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 42164@debbugs.gnu.org Received: via spool by 42164-submit@debbugs.gnu.org id=B42164.165073106314469 (code B ref 42164); Sat, 23 Apr 2022 16:25:02 +0000 Received: (at 42164) by debbugs.gnu.org; 23 Apr 2022 16:24:23 +0000 Received: from localhost ([127.0.0.1]:57089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niIYZ-0003lI-CI for submit@debbugs.gnu.org; Sat, 23 Apr 2022 12:24:23 -0400 Received: from coleridge.kublai.com ([166.84.7.167]:61400 helo=mail.spork.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niIOu-0003Uk-CX for 42164@debbugs.gnu.org; Sat, 23 Apr 2022 12:14:25 -0400 Received: from ditto (unknown [IPv6:2001:470:1f07:1b9:8650:a942:ec5e:856b]) by mail.spork.org (Postfix) with ESMTPSA id D84FE4B83 for <42164@debbugs.gnu.org>; Sat, 23 Apr 2022 12:14:16 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1650730464; bh=OyXU5co07yy+4sW1nXqGDhh4PJFUEP7Wr8h6IELGXPo=; h=From:To:Subject:Date; b=ek05edVqOrQ6rsjd+Bv/2ArhO5QACGWPX7lzosYVxjz8mBUrNBt+4mMtUcVDew1sK MzWRffEr5l+uS8I1U7/Dla5+woJ5y67YHdeiJadxEnkq7Hj+oQJcErfMqVg+kWhpvh kyPAd4tHSrTeQL0YuWBgST5dowA9OidxUxX0IUzI= User-agent: mu4e 1.6.10; emacs 28.1 From: Brian Cully Date: Sat, 23 Apr 2022 12:03:21 -0400 Message-ID: <87k0bfkca3.fsf@ditto.jhoto.spork.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Sat, 23 Apr 2022 12:24:22 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" 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=1650731113; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=GJHV6bt4U4SJFsj9xmfGXsgb/hnUyg2yPSlRwIuGvws=; b=LB2CcOQfFr56uObfE4vzdOSB7qiTnME6zN4qi4SBj4E9MlhqpdNhoUnMQQuMITiqv9tTjC KV1PMrrVTkrZWKBM7gOkpFLvGmC2kR+705xKICd0xGxsIBzS1xoiH/c6fog2rtgjIcn/xc VoBR1Gm7iba463qoHp5152RJlwDvHvceftQqboIfrzKKesZ8d/rasV7313aX0moVXAbLkf a+xiERZGwOqTB4r0hzwyi+evdvSAtAZwtO43zIN8E6yrEnq3YrQcoz9gVOLQVbekPwF9Hd TxzIjyVFEfsDR07kDQ7W3+8lH3+pYshpu6KOnrTPfXlJKuImrt2Bx7oG80XcQw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650731113; a=rsa-sha256; cv=none; b=qfD3GFXCV5iIRSZ/NHYdeqtwsRdfjGGmT+fN/svsAwWAmZL5dwZml3BsjlJA7WQy5WUkHz tuHafwoR/qrbMivUP3UTFhNnn9VsqtBpgisHnxqIrZWDT2bhIOiO1a3sQzuDBdG+a4QbIo sNdcFDkwxB3dk1l36cwYfLj4ooNkTmEgmGJPtTU+ylnbIZGHVHEItIxiTjI/QM5Kc57NoO Pm5X9NueYqh1nIDJxvc0X/SPA/HoaBJYqXnGUimutpaU0fqXLULWq8tIJB+NvjZUoYLqOe 084PgYzJPHNt4DAQUdutN3ToagPoMhkjjoMvb+iFAc3Hs2tC7DJxzoAx7aLXiw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=ek05edVq; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.98 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=ek05edVq; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C4313303F2 X-Spam-Score: 0.98 X-Migadu-Scanner: scn1.migadu.com X-TUID: Wd/BxStiydNc I was having a similar issue, so I dug into this issue a bit, and it turns out that you *can* select an output from file-append, but the syntax is a bit wonky: ---[snip]--- (let ((fa (file-append pkg "/path"))) $~$#fa:output) ---[snip]--- I=E2=80=99ve tried to remove the let: ---[snip]--- $~$#(file-append pkg "/path"):output ---[snip]--- But this confuses the reader, an it things =E2=80=98:output=E2=80=99 is a variable. Not too surprising, but it does make the Guix configuration files more awkward, since now you have to =E2=80=98define=E2=80=99 the file= -append operations at the top level so you can refer to them with the syntax above. I would prefer to have something like any of the following (in order of preference): ---[snip]--- (file-append pkg:output "/path") (file-append (list pkg "output") "/path") (file-append $~$#pkg:output "/path") ---[snip]--- The reason being that it=E2=80=99s awkward to select the output after the file-append due to syntax, and it=E2=80=99s less intuitive than trying = to select the output directly from the package inside the file-append (and it seems I=E2=80=99m not alone in this). I=E2=80=99ve been through the code= , so to some degree I realize why things are being done the way they are, but that doesn=E2=80=99t change my current preferences. I prefer the list over the gexp/ungexp because we already use lists to select outputs in other parts of the config declarations, and the gexp/ungexp stuff is harder to understand from the point-of-view of a user, rather than package author. It=E2=80=99s also not present in the majority of configs, I=E2=80=99d wager. Before I found the =E2=80=9Ccorrect=E2=80=9D way to do things, I did cobble together some code that allowed the (list pkg "output") form to work, and would be happy to submit it upstream. It=E2=80=99s not perfect, since it ignores the =E2=80=98output=E2=80=99 argument in the gexp expander in favor= of the stored output in the file-append, but I don=E2=80=99t think that=E2=80=99s = an actual issue in practice. -bjc