From unknown Sun Jun 22 08:06:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors Resent-From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 02 Jul 2020 12:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42164 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 42164@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159369125119679 (code B ref -1); Thu, 02 Jul 2020 12:01:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Jul 2020 12:00:51 +0000 Received: from localhost ([127.0.0.1]:54495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqxtb-00057L-Bh for submit@debbugs.gnu.org; Thu, 02 Jul 2020 08:00:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:57386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqxtV-00057B-Om for submit@debbugs.gnu.org; Thu, 02 Jul 2020 08:00:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqxtV-0004xY-0d for bug-guix@gnu.org; Thu, 02 Jul 2020 08:00:45 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:58614) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqxtS-0001up-3D for bug-guix@gnu.org; Thu, 02 Jul 2020 08:00:44 -0400 Received: (qmail 26689 invoked by uid 1009); 2 Jul 2020 14:00:32 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25860. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.060242 secs); 02 Jul 2020 12:00:32 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 2 Jul 2020 14:00:31 +0200 Date: Thu, 2 Jul 2020 14:00:29 +0200 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Message-ID: <20200702120029.vglwgexyasdzhgll@gravity> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wv3iondptoveb6kp" Content-Disposition: inline Received-SPF: none client-ip=37.59.186.212; envelope-from=kuba@kadziolka.net; helo=pat.zlotemysli.pl X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/02 08:00:32 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --wv3iondptoveb6kp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Consider this minimal operating-system definition: (use-modules (gnu)) (use-package-modules gcc) (operating-system (host-name "test") (timezone "UTC") (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (target "/boot/efi"))) (file-systems (cons* (file-system (device (file-system-label "root")) (mount-point "/") (type "ext4")) %base-file-systems)) (packages '()) (services (cons* (service special-files-service-type `(("/lib64" ,(directory-union "rustup-libs" (list (file-append glibc "/lib") (file-append #~#$gcc:lib "/lib"))))= )) %base-services))) I would expect this way of specifying a specific output of a package to work, but it results in the following error: ice-9/boot-9.scm:1515:18: object is not an exception of the right type #<&g= exp-input-error input: #:lib> 7f06c6b06990>> # This also happens when I omit the directory-union: (service special-files-service-type `(("/lib64" ,(file-append #~#$gcc:lib "/lib")))) What *does* work, is this variant with string-append: (service special-files-service-type `(("/lib64" ,#~(string-append #$gcc:lib "/lib")))) However, using it in the directory-union breaks again: (service special-files-service-type `(("/lib64" ,(directory-union "rustup-libs" (list (file-append glibc "/lib") #~(string-append #$gcc:lib "/lib"))= )))) ERROR: In procedure opendir: Wrong type (expecting string): (string-append "/gnu/store/mdxmdhrlkgdik6ay9= pzmmy8mjcbibpwb-gcc-7.5.0-lib" "/lib") builder for `/gnu/store/p5hf7hqxn35fgsb75s5i7326vyzb8jkr-rustup-libs.drv' f= ailed with exit code 1 I have figured out that the following does work: (service special-files-service-type `(("/lib64" ,#~(directory-union "rustup-libs" (list (string-append #$glibc "/lib") (string-append #$gcc:lib "/lib"))= )))) However, I would expect the other variants to work as well. The documentation and error messages are lacking in this regard. Regards, Jakub K=C4=85dzio=C5=82ka --wv3iondptoveb6kp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl79zF0ACgkQ4xWnWEYT FWRBAxAA0rX9+b79yvNhYWwxykCeKv2rd1YxjyEvkQdfNJ1ZUbaVORbc5AhOWrum QBe/74r5HM6Hgt6KHEDRtI3FIR7hAQ+6ufz6w5RkVCiO/pLq3iin6kg/9neDwxVC F6Mo4WXu8bQRg7QUIGTxEwpyrwq2qYYGtNn9FQ5eYxQnx8uziDWOid1N5GPQIWyq jMWBHtMyDbw7F3AYFYh913NV3qPYMym4uKWMHazpBAwf3gF1+o4xnUu1G8MDfSWT k/TvNUNWYNuI7JTvrcmb/i/A0bkCSFgKUMvlqeoyPpwmM1SSjz59/tYZv6xzWrXB Zgp7+f6ksREpIbcs5EMkg1XG9IYXLG/B7HIYHWoV/mAvXA6f3t21q+FoPKfOrwrz bDSkuB1+ZhI8JLFvpC/YQ1a5qKz8pGGsPvcxZ2cqU83eFRIZdWDKXfsObewnjTaF BpqNdIV3WXH97PF7z65dFWc9fG+95IoeLfcZw9YqXt49+45XbzQA1+gkMrAdRY4o 9sdjwCMI/lxppHeUxJn/bHlQx/a6GX9EMHl9VlPYgIUICtPSIQyHw4KB4g3f8fee sUhMOuAYA+6i32P5erRraaaqK/7KUcJm0r1e/0xOJAdtaOeXzia99+6Mj+f6Tcc1 Vru+BWD6SVSwjaY6OgPFjjI8jIcFBdf2frxiwE0+wBArth6hM54= =Ppg3 -----END PGP SIGNATURE----- --wv3iondptoveb6kp-- From unknown Sun Jun 22 08:06:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 13 Apr 2021 01:59: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: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Cc: 42164@debbugs.gnu.org Received: via spool by 42164-submit@debbugs.gnu.org id=B42164.16182791344419 (code B ref 42164); Tue, 13 Apr 2021 01:59:02 +0000 Received: (at 42164) by debbugs.gnu.org; 13 Apr 2021 01:58:54 +0000 Received: from localhost ([127.0.0.1]:58415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lW8KM-00019D-61 for submit@debbugs.gnu.org; Mon, 12 Apr 2021 21:58:54 -0400 Received: from mail-qk1-f177.google.com ([209.85.222.177]:44696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lW8KK-000190-Cp for 42164@debbugs.gnu.org; Mon, 12 Apr 2021 21:58:52 -0400 Received: by mail-qk1-f177.google.com with SMTP id x11so16393062qkp.11 for <42164@debbugs.gnu.org>; Mon, 12 Apr 2021 18:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=eCP9jeo69rIjweNd18F+TZNcfwfHzM/nNvFBC/6tYKU=; b=YkjLq0tLyJWPETAJYBWCHxhgXm0At4st3wIRPsctAatHbFvm6PqPNeSNwzF7QwQUnr Lwfbb3mxigUFSHcJu1kqfX2rxwYug8Q3hHeYD/jxCmVPKLGv/jkdc8P/tHLbIv73WhXs JQ1oi8+i5vp+Chl0osmkguhf3DKJ1QEB4uoByHyVLVUAo7mgh0e/mSmoDel9wijUCT9E GcxJD5s6Y0PRwQGqpEEuviUYY9TYI9ibOBcrbKWO9i4EeBqjHOVa9mEw0pFbqmY7zH24 eyo7XaBOcTgEp3qqEDQ/TbHBjjdnmruE7oTkhL1+H+TfezcOmrwNKTbLzi9mHoOUkuiE uCTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=eCP9jeo69rIjweNd18F+TZNcfwfHzM/nNvFBC/6tYKU=; b=LzrD4UUe1VH7TItgGSQ5PNW2s02ob6SA5Hxdvl0OouGuBqA3leWi9B+7UqQOK6lOEr iyPA2suB4NyQn1/z7e+wLNAahzsaC4M4qzCRVa8W6IA0JP/sY0vVpG4DJw7GAKzULt2a ZsJtVciB/wxyn4WpL7yWXXeJ1ilNXCHPNmGqS4S4VUMc0Ii/e4FGa+2ivZrl5vfQn++u GPneKJWPkYCLcM51j/w7faoLyt5whsGNBqz+atjzMOY/EHImWdI97RT1y+hQjyfjWusB 9TLfUKVrgPB9iwG5dBkeeGp2S67QIdcc4q/PuVSgwFOGU6Vc77n5A+RBj6JudzHi5V93 coJw== X-Gm-Message-State: AOAM5311zXjAX5VZkZC4gW6Vr/k9TiUU3jeUpdVTylFekKeOziOpGjsg AJkrjzQL0U3dZX+9KfCeOX1qcmwHBGQ= X-Google-Smtp-Source: ABdhPJxbrtKfakn+RLARNuMbVM/E1XHhBowvBfCU/FEsfndCtnhQjgTCOlYTjbmsr3lSh6RRW9Rj8g== X-Received: by 2002:ae9:de42:: with SMTP id s63mr28977310qkf.83.1618279126582; Mon, 12 Apr 2021 18:58:46 -0700 (PDT) Received: from hurd (dsl-10-128-209.b2b2c.ca. [72.10.128.209]) by smtp.gmail.com with ESMTPSA id l17sm8699142qtk.60.2021.04.12.18.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 18:58:43 -0700 (PDT) From: Maxim Cournoyer References: <20200702120029.vglwgexyasdzhgll@gravity> Date: Mon, 12 Apr 2021 21:58:37 -0400 In-Reply-To: <20200702120029.vglwgexyasdzhgll@gravity> ("Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?="'s message of "Thu, 2 Jul 2020 14:00:29 +0200") Message-ID: <874kgbc5de.fsf@gmail.com> 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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Jakub! Jakub K=C4=85dzio=C5=82ka writes: > Consider this minimal operating-system definition: > > (use-modules (gnu)) > (use-package-modules gcc) > > (operating-system > (host-name "test") > (timezone "UTC") > (bootloader (bootloader-configuration > (bootloader grub-efi-bootloader) > (target "/boot/efi"))) > (file-systems (cons* > (file-system > (device (file-system-label "root")) > (mount-point "/") > (type "ext4")) > %base-file-systems)) > (packages '()) > (services (cons* > (service special-files-service-type > `(("/lib64" ,(directory-union "rustup-libs" > (list > (file-append glibc "/lib") > (file-append #~#$gcc:lib "/lib"))= )))) > %base-services))) > > I would expect this way of specifying a specific output of a package to > work, but it results in the following error: > > ice-9/boot-9.scm:1515:18: object is not an exception of the right type #<= &gexp-input-error input: #:lib> 7f06c6b06990>> # [...] > I have figured out that the following does work: > > (service special-files-service-type > `(("/lib64" ,#~(directory-union "rustup-libs" > (list > (string-append #$glibc "/lib") > (string-append #$gcc:lib "/lib"= )))))) > > However, I would expect the other variants to work as well. The > documentation and error messages are lacking in this regard. This seems to come up every time I have to specify a non-default package output; I've investigated the issue a bit and it seems to be caused by the lack of a gexp-compiler for the gexp object resulting from #$package:output, which is of type gexp-input as represented by, for example: #:tools> >From the REPL (lower-object (gexp (ungexp opendht "tools"))) $17 =3D # scheme@(gnu services jami)> ,run-in-store $17 While executing meta-command: ERROR: 1. &gexp-input-error: #:tools> 7f2db7427690> =20=20 So if we were to define/register a gexp-compiler for this kind of gexp-input, we could make it work, but I haven't yet investigated how easy/difficult that would be. Seems worthwhile though, this issue is quite annoying when attempting to work with specific outputs! Thanks for the detailed report. Maxim From unknown Sun Jun 22 08:06:18 2025 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-Spam-Score: -0.0 (/) 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From unknown Sun Jun 22 08:06:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 23 Apr 2022 17:07:01 +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: Brian Cully , 42164@debbugs.gnu.org Received: via spool by 42164-submit@debbugs.gnu.org id=B42164.165073360427119 (code B ref 42164); Sat, 23 Apr 2022 17:07:01 +0000 Received: (at 42164) by debbugs.gnu.org; 23 Apr 2022 17:06:44 +0000 Received: from localhost ([127.0.0.1]:57136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niJDY-00073K-DS for submit@debbugs.gnu.org; Sat, 23 Apr 2022 13:06:44 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:39748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niJDW-00073B-8Q for 42164@debbugs.gnu.org; Sat, 23 Apr 2022 13:06:43 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by xavier.telenet-ops.be with bizsmtp id NH6g270054UW6Th01H6gem; Sat, 23 Apr 2022 19:06:40 +0200 Message-ID: From: Maxime Devos Date: Sat, 23 Apr 2022 19:06:34 +0200 In-Reply-To: <87k0bfkca3.fsf@ditto.jhoto.spork.org> References: <20200702120029.vglwgexyasdzhgll@gravity> <87k0bfkca3.fsf@ditto.jhoto.spork.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-BE4cIAI8GCbAN+Ocws/j" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1650733600; bh=4UkWbwvo6m5TznjlnuR2gLQV8H8nkhYT3r41ru8cceE=; h=Subject:From:To:Date:In-Reply-To:References; b=gxoaLNcoGHwRA0tnhwbL4/ASPAkPHRQzqkV6AOFh6fPNYUO7E2pCJJXIC51y/mizs CA0+Vb2ogjxlF4POhrQenT6iqFVkhdrXUtCKoldScznfq2nXYFGWQKNEvXCBffEMzn ux5nqBPs7aE+nmokjlXxzq33mT06SnAn+ijBugiyskOP21TufGAvy8crPGmX8IsDLE NVwrYbGsAYslI8xU7W+HVtVagNWUws6v/CVDo9TQD6p/3REOlyTKzOjkrEd0W/n3OA +BcBjvJst/EQ67SkNRwkn3oh3PrJShclOtrym8vVdQTA3buaFgHyYiZZ2U72GoC/5v JhccfByy2dZUA== X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-BE4cIAI8GCbAN+Ocws/j Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Brian Cully schreef op za 23-04-2022 om 12:03 [-0400]: > 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: >=20 > ---[snip]--- > (let ((fa (file-append pkg "/path"))) > =C2=A0 $~$#fa:output) > ---[snip]--- >=20 > I=E2=80=99ve tried to remove the let: >=20 > ---[snip]--- > $~$#(file-append pkg "/path"):output > ---[snip]--- Do you mean #~#$fa:output here? >=20 > 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 fi= le-append > operations at the top level so you can refer to them with the syntax > above. >=20 > I would prefer to have something like any of the following (in > order of preference): >=20 > ---[snip]--- > (file-append pkg:output "/path") This one is only possible if file-append becomes syntax instead of a procedure. > (file-append (list pkg "output") "/path") Possible, but seems semantically wrong to me -- what's a list doing in a file-manipulating procedure? > (file-append $~$#pkg:output "/path") I assume this would be #~#$pkg:output? My bikeshed proposal: (file-append (output glibc "static") "/lib/...") Here, 'output' is a procedure constructing some kind of object. This would also be useful outside 'file-append', as it allows programmatically constructing equivalents #~#$pkg:output for multiple 'output' (there was some package definition some while back where this would have been useful). This 'output' could perhaps also be used in 'inputs' / 'native-inputs' fields. YMMV. Greetings, Maxime. --=-BE4cIAI8GCbAN+Ocws/j Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmQyGhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ijSAP41ydOYBlz6vXJiKxcFUTy4DQCl qYZg5zCfRoQwAr4mhgD/U2jNkxQsin69eY38p0aauSPaP5aaQnzuX59Opkqp7Qs= =HXtc -----END PGP SIGNATURE----- --=-BE4cIAI8GCbAN+Ocws/j-- From unknown Sun Jun 22 08:06:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 23 Apr 2022 18:39: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: Brian Cully Cc: 42164@debbugs.gnu.org Received: via spool by 42164-submit@debbugs.gnu.org id=B42164.16507391013674 (code B ref 42164); Sat, 23 Apr 2022 18:39:02 +0000 Received: (at 42164) by debbugs.gnu.org; 23 Apr 2022 18:38:21 +0000 Received: from localhost ([127.0.0.1]:57229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niKeD-0000xC-Co for submit@debbugs.gnu.org; Sat, 23 Apr 2022 14:38:21 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:55950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niKeA-0000x2-UM for 42164@debbugs.gnu.org; Sat, 23 Apr 2022 14:38:20 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by andre.telenet-ops.be with bizsmtp id NJeG2700R4UW6Th01JeGY2; Sat, 23 Apr 2022 20:38:17 +0200 Message-ID: <2bda48c996ac6b0bae970d8e5559675d6984ac51.camel@telenet.be> From: Maxime Devos Date: Sat, 23 Apr 2022 20:38:12 +0200 In-Reply-To: <87bkwrk7zk.fsf@ditto.jhoto.spork.org> References: <20200702120029.vglwgexyasdzhgll@gravity> <87k0bfkca3.fsf@ditto.jhoto.spork.org> <87bkwrk7zk.fsf@ditto.jhoto.spork.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-DCc5VPW4oVU4GA7q+5rx" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1650739097; bh=nMAjDckM/erU5UYvOgck5k4hLHIZd/lzlNxvSgShU9M=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=OKVvfW3ai7O55FRPBiuxq/rInJPcye568nTpgYsYjP9Neq6ud++bqrxrw5Cym0VsG YlDzgdn5RLR7UvhW/WsLdaj8BYi6h7lOIR/kylULP7VUBpH6NXWjiDtu5rCVgV5FhZ 1H0B65ZnENG6Cg198APaTQZsFpx0suvaA2LbGII40k80DcMB1H7SjqrlecpaFI20+Z a1wkcZZYwOQtZkbGw/1Vd6NIp+eTfUCjjGMBmTulxumWLsuF+3UhWJnVn2M2XjJeCS W5E8vJmnV0gTgG5CBySn0OHA+/VTDKAvAacShQooIDNji5EMYwNUSB/pQxxCNZ7y+a 2LzgphJP4QQTw== X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-DCc5VPW4oVU4GA7q+5rx Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Brian Cully schreef op za 23-04-2022 om 13:29 [-0400]: > I like this, and would prefer it over the =E2=80=98list=E2=80=99 proposa= l. I=E2=80=99m > not sure how to implement it given my limited knowledge of Guix > internals, though. Special-casing a list inside of file-append was > fairly straightforward and solved the immediate issue. Proposed implementation: (define (output thing output) (gexp-input package output)) Seems like this thing already exists, it's just not well-known and not documented in the manual. Greetings, Maxime --=-DCc5VPW4oVU4GA7q+5rx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmRHlBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7mURAQCf5anTWJ2mMopZRSg9neOe9B/7 O7uNougodALjQL3PHwD/VwSul5BtVSAbFtijCRGScc3VXEnQqkQwmNBMT4y76wQ= =dKxa -----END PGP SIGNATURE----- --=-DCc5VPW4oVU4GA7q+5rx-- From unknown Sun Jun 22 08:06:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 23 Apr 2022 21:08:01 +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: Brian Cully Cc: 42164@debbugs.gnu.org Received: via spool by 42164-submit@debbugs.gnu.org id=B42164.165074803818117 (code B ref 42164); Sat, 23 Apr 2022 21:08:01 +0000 Received: (at 42164) by debbugs.gnu.org; 23 Apr 2022 21:07:18 +0000 Received: from localhost ([127.0.0.1]:57356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niMyL-0004i8-RM for submit@debbugs.gnu.org; Sat, 23 Apr 2022 17:07:17 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:48428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niMyJ-0004hy-0j for 42164@debbugs.gnu.org; Sat, 23 Apr 2022 17:07:15 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id NM7D270054UW6Th01M7Djq; Sat, 23 Apr 2022 23:07:13 +0200 Message-ID: <5be60a6138fde8bfe521e7e9c7c18f28a9c50742.camel@telenet.be> From: Maxime Devos Date: Sat, 23 Apr 2022 23:07:08 +0200 In-Reply-To: <877d7f7cn4.fsf@ditto.jhoto.spork.org> References: <20200702120029.vglwgexyasdzhgll@gravity> <87k0bfkca3.fsf@ditto.jhoto.spork.org> <87bkwrk7zk.fsf@ditto.jhoto.spork.org> <2bda48c996ac6b0bae970d8e5559675d6984ac51.camel@telenet.be> <877d7f7cn4.fsf@ditto.jhoto.spork.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-KwxigsVkGcmUgJjdF7n7" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1650748033; bh=apSWunEuwKDxsFXyEm4+72mU3KLjKjZv4Y1//c5b3KQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=XPYvKnbZEh5eNha8/H6z/F9gx/PlLfInapQrnFQw0HegDMT8d/Od1NRgqwPEl7G5x VrksYk2CmOPW9b8Dppg7J2+SrNgrIcjRFzd+0GIxg2WVgKFPcY6Nocg9zYusZ/0ywM 5hu3ZENL/WognukbtiSUalquAxyGqvAWpQqvb1mTknnVH++pboEZNXUrmjubz+14oh poXOkyJQnQXqJf+JRN99fxLsfi5QPMK9ajZqFcPj3Vm3GN7XEfYe36z/EEBRv9PAA+ wT6/Q4CeHE9jza5wnc8PoZE7TuiChhah2XJvr/EwULvLNLh935eC2FasiUC44JGAO1 kq9ukwxbWN6YA== X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-KwxigsVkGcmUgJjdF7n7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Brian Cully schreef op za 23-04-2022 om 16:40 [-0400]: > Where is this in the code? Nowhere. I tried implementing 'output', and noticed I just ended up with something equivalent to a simple call to 'gexp-input' (hence, =E2=80=98this thing already exists=E2=80=99). 'gexp-input' can be found in= (guix gexp). Greetings, Maxime. --=-KwxigsVkGcmUgJjdF7n7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmRqfBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7nDlAQCATS8e50o67kiyOwdNYBwSgm0y PYxHuFmULe7rZ/YUfQEA5EC+0TC29tGJh+F9WNM65OfPPNjOMDOx4QnzgkFNIAM= =oUPK -----END PGP SIGNATURE----- --=-KwxigsVkGcmUgJjdF7n7-- From unknown Sun Jun 22 08:06:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors Resent-From: Brian Cully Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 23 Apr 2022 21:13: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: Maxime Devos Cc: 42164@debbugs.gnu.org Received: via spool by 42164-submit@debbugs.gnu.org id=B42164.165074833918566 (code B ref 42164); Sat, 23 Apr 2022 21:13:02 +0000 Received: (at 42164) by debbugs.gnu.org; 23 Apr 2022 21:12:19 +0000 Received: from localhost ([127.0.0.1]:57359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niN3C-0004pM-DH for submit@debbugs.gnu.org; Sat, 23 Apr 2022 17:12:19 -0400 Received: from coleridge.kublai.com ([166.84.7.167]:57826 helo=mail.spork.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niJqj-00085q-62 for 42164@debbugs.gnu.org; Sat, 23 Apr 2022 13:47:13 -0400 Received: from ditto (unknown [IPv6:2001:470:1f07:1b9:8650:a942:ec5e:856b]) by mail.spork.org (Postfix) with ESMTPSA id 8D7314B33; Sat, 23 Apr 2022 13:46:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1650736032; bh=wLACj+URHoCjOLEEDsTE8T1RMMMsx3v3/3sObbMvCgQ=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=vYSJHfpXEhkwZqBYXS4+mpx+vglrYn3ZHj6rp9IB3MKlE2w8OnD13J3yZVMKTW2Y7 y1YPm9q21prmj4UWFrAR2wh3hn6hmdUJrX0HfeChKwSAEh5k6qSkEAfpjgtBovD9vb kuMekqtBfowDnDI40XmAQM0oGXUkCbVXd1r2iKM4= References: <20200702120029.vglwgexyasdzhgll@gravity> <87k0bfkca3.fsf@ditto.jhoto.spork.org> User-agent: mu4e 1.6.10; emacs 28.1 From: Brian Cully Date: Sat, 23 Apr 2022 13:29:18 -0400 In-reply-to: Message-ID: <87bkwrk7zk.fsf@ditto.jhoto.spork.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Mailman-Approved-At: Sat, 23 Apr 2022 17:12:18 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Maxime Devos writes: > Do you mean #~#$fa:output here? Yes, I did. Sorry, my fingers have minds of their own, and the gexp syntax, in particular, really runs counter to their memory. >> (file-append pkg:output "/path") > > This one is only possible if file-append becomes syntax instead of a > procedure. I did not expect this to be particularly possible, but I find it aesthetically and intuitively pleasing enough to propose it anyway. >> (file-append (list pkg "output") "/path") > > Possible, but seems semantically wrong to me -- what's a list doing in > a file-manipulating procedure? It need not be a list, but I do think it makes sense inside the file-append, rather than a modification to file-append=E2=80=99s results, a= s is currently the case. I picked list because it was being used elsewhere to explicitly select a derivation=E2=80=99s output. > My bikeshed proposal: > > (file-append (output glibc "static") "/lib/...") > > Here, 'output' is a procedure constructing some kind of object. > This would also be useful outside 'file-append', as it allows > programmatically constructing equivalents #~#$pkg:output for multiple > 'output' (there was some package definition some while back where this > would have been useful). > > This 'output' could perhaps also be used in 'inputs' / 'native-inputs' > fields. YMMV. I like this, and would prefer it over the =E2=80=98list=E2=80=99 proposal.= I=E2=80=99m not sure how to implement it given my limited knowledge of Guix internals, though. Special-casing a list inside of file-append was fairly straightforward and solved the immediate issue. I=E2=80=99d be happy to take a look at implementing this, but I=E2=80=99m = a bit clueless where to begin, as it=E2=80=99s much more general than my previous attempt. If you (or others) have the time, I=E2=80=99d appreciate any point= ers that=E2=80=99d make it easier to begin. For instance: I would expect the =E2=80=98output=E2=80=99 form to be lower= able, which would be done in the =E2=80=98compile=E2=80=99 branch of a gexp-compi= ler, but then it would have to be expanded later in the =E2=80=98expand=E2=80=99 branch, = which presents an issue: the third argument to the expander procedure is already an output. Would we do away with that argument? Somehow fill it in based on the =E2=80=98output=E2=80=99 form (either expressed or implicit= )? Let the =E2=80=98output=E2=80=99 form, if present, override it? -bjc From unknown Sun Jun 22 08:06:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors Resent-From: Brian Cully Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 23 Apr 2022 21:13: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: Maxime Devos Cc: 42164@debbugs.gnu.org Received: via spool by 42164-submit@debbugs.gnu.org id=B42164.165074834018573 (code B ref 42164); Sat, 23 Apr 2022 21:13:02 +0000 Received: (at 42164) by debbugs.gnu.org; 23 Apr 2022 21:12:20 +0000 Received: from localhost ([127.0.0.1]:57361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niN3D-0004pP-Ke for submit@debbugs.gnu.org; Sat, 23 Apr 2022 17:12:19 -0400 Received: from coleridge.kublai.com ([166.84.7.167]:56667 helo=mail.spork.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niMch-000483-Et for 42164@debbugs.gnu.org; Sat, 23 Apr 2022 16:44:56 -0400 Received: from ditto (unknown [IPv6:2001:470:1f07:1b9:8650:a942:ec5e:856b]) by mail.spork.org (Postfix) with ESMTPSA id 2D55F4B88; Sat, 23 Apr 2022 16:44:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1650746694; bh=TBGzbvTSa5yanB+yDSfzclYx90IdvszTdeZB5XrkjbQ=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=MPBJ99Jv7Oq58JxzZjMHargn9hrLtk/PlcI6bsUMYGmyqTjvhjPGq9jarBmCM89d9 eA5HzjoDceT9PtVSXej8GBEwjCFqEzr2L86qwwWCrf4/Wp2eoh/9VzUBqf6bXr73kQ ovXNmbjo23+Jo+bycUdS7XltgkjAOms31Zf0mTaM= References: <20200702120029.vglwgexyasdzhgll@gravity> <87k0bfkca3.fsf@ditto.jhoto.spork.org> <87bkwrk7zk.fsf@ditto.jhoto.spork.org> <2bda48c996ac6b0bae970d8e5559675d6984ac51.camel@telenet.be> User-agent: mu4e 1.6.10; emacs 28.1 From: Brian Cully Date: Sat, 23 Apr 2022 16:40:08 -0400 In-reply-to: <2bda48c996ac6b0bae970d8e5559675d6984ac51.camel@telenet.be> Message-ID: <877d7f7cn4.fsf@ditto.jhoto.spork.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Mailman-Approved-At: Sat, 23 Apr 2022 17:12:18 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Maxime Devos writes: > Proposed implementation: > > (define (output thing output) > (gexp-input package output)) > > Seems like this thing already exists, it's just not well-known and not > documented in the manual. Where is this in the code? I couldn=E2=80=99t find it myself (grepping for these keywords turns up a lot of false positives). On the off chance it might work, I did try =E2=80=98(file-append (output pkg "lib") "/path")= =E2=80=99 and was told that =E2=80=98output=E2=80=99 is an unbound variable. -bjc From unknown Sun Jun 22 08:06:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors Resent-From: Brian Cully Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 24 Apr 2022 23:37:01 +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: Maxime Devos Cc: 42164@debbugs.gnu.org Received: via spool by 42164-submit@debbugs.gnu.org id=B42164.16508433814350 (code B ref 42164); Sun, 24 Apr 2022 23:37:01 +0000 Received: (at 42164) by debbugs.gnu.org; 24 Apr 2022 23:36:21 +0000 Received: from localhost ([127.0.0.1]:60346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nilm9-000185-HQ for submit@debbugs.gnu.org; Sun, 24 Apr 2022 19:36:21 -0400 Received: from coleridge.kublai.com ([166.84.7.167]:57936 helo=mail.spork.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nilm8-00017y-CQ for 42164@debbugs.gnu.org; Sun, 24 Apr 2022 19:36:20 -0400 Received: from ditto (unknown [IPv6:2001:470:1f07:1b9:ec80:35ff:fedf:c760]) by mail.spork.org (Postfix) with ESMTPSA id D05D94BA3; Sun, 24 Apr 2022 19:36:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1650843380; bh=gXbZxnZIM614BgFb84SX0UxYy3gv5AUW6ugqX4ltsuQ=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=v6gqSKamI9PCr2igUK5WiZpNz+rHdssw4sU/R8vPb9bXOUfUxW1XQUA2wqIbJQilp ovd7mSqYgJISmdB9gHpl8go/qrkM85E7HuWOtglI/z5ae++6oUVYALRhaX28sQMZjX /1TPoBLLvjUILMvSLpMp1aELDOOHeAkOdlvhrWZE= References: <20200702120029.vglwgexyasdzhgll@gravity> <87k0bfkca3.fsf@ditto.jhoto.spork.org> <87bkwrk7zk.fsf@ditto.jhoto.spork.org> <2bda48c996ac6b0bae970d8e5559675d6984ac51.camel@telenet.be> <877d7f7cn4.fsf@ditto.jhoto.spork.org> <5be60a6138fde8bfe521e7e9c7c18f28a9c50742.camel@telenet.be> User-agent: mu4e 1.6.10; emacs 28.1 From: Brian Cully Date: Sun, 24 Apr 2022 19:27:11 -0400 In-reply-to: <5be60a6138fde8bfe521e7e9c7c18f28a9c50742.camel@telenet.be> Message-ID: <87bkwqqckg.fsf@ditto.jhoto.spork.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Maxime Devos writes: > Nowhere. I tried implementing 'output', and noticed I just=20 > ended up > with something equivalent to a simple call to 'gexp-input'=20 > (hence, > =E2=80=98this thing already exists=E2=80=99). 'gexp-input' can be found = in=20 > (guix > gexp). I finally had a chance to mess around with this, and it=20 does, indeed, do the job. Since it wasn=E2=80=99t clear to me how=20 it worked, I=E2=80=99d like to document it here. To accomplish the goal at the begging of this thread,=20 rather than using: --8<---------------cut here---------------start------------->8--- (file-append #~#$gcc:lib =E2=80=9C/lib=E2=80=9D) --8<---------------cut here---------------end--------------->8--- The =E2=80=9Ccorrect=E2=80=9D way is this: --8<---------------cut here---------------start------------->8--- (gexp-input (file-append gcc "/lib") "lib") --8<---------------cut here---------------end--------------->8--- The name seems a little weird, since we=E2=80=99re selecting an=20 output, but it makes sense from the other end: we=E2=80=99re=20 creating an input for the higher-level expression (in this=20 case, the special-file-services-type). Anyway, this works for me, so this ticket can probably be=20 closed. -bjc From unknown Sun Jun 22 08:06:18 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Subject: bug#42164: closed (Re: bug#42164: Combining file-append with gexps results in incomprehensible errors) Message-ID: References: <20200702120029.vglwgexyasdzhgll@gravity> X-Gnu-PR-Message: they-closed 42164 X-Gnu-PR-Package: guix Reply-To: 42164@debbugs.gnu.org Date: Mon, 25 Apr 2022 06:22:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1650867722-13820-1" This is a multi-part message in MIME format... ------------=_1650867722-13820-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #42164: Combining file-append with gexps results in incomprehensible errors which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 42164@debbugs.gnu.org. --=20 42164: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D42164 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1650867722-13820-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 42164-done) by debbugs.gnu.org; 25 Apr 2022 06:21:10 +0000 Received: from localhost ([127.0.0.1]:32937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nis5u-0003Zg-0M for submit@debbugs.gnu.org; Mon, 25 Apr 2022 02:21:10 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:35572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nis5o-0003ZQ-Pr for 42164-done@debbugs.gnu.org; Mon, 25 Apr 2022 02:21:08 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by laurent.telenet-ops.be with bizsmtp id NuM22700N4UW6Th01uM2VB; Mon, 25 Apr 2022 08:21:03 +0200 Message-ID: Subject: Re: bug#42164: Combining file-append with gexps results in incomprehensible errors From: Maxime Devos To: Brian Cully Date: Mon, 25 Apr 2022 08:20:57 +0200 In-Reply-To: <87bkwqqckg.fsf@ditto.jhoto.spork.org> References: <20200702120029.vglwgexyasdzhgll@gravity> <87k0bfkca3.fsf@ditto.jhoto.spork.org> <87bkwrk7zk.fsf@ditto.jhoto.spork.org> <2bda48c996ac6b0bae970d8e5559675d6984ac51.camel@telenet.be> <877d7f7cn4.fsf@ditto.jhoto.spork.org> <5be60a6138fde8bfe521e7e9c7c18f28a9c50742.camel@telenet.be> <87bkwqqckg.fsf@ditto.jhoto.spork.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-A8qEIfWQtoNwhu9T2Pxn" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1650867663; bh=GfvVqAMM7zj6eXMpNGHbMNh/LB7LZk/piKvI8qhIJ80=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=FSJLiJH1umYThlmGvcNTt65J+VBg1ELeaZdk+CSxaQ3+VTeN32aQAsWNss3ooaUns sSoLZNRFOtN16GDiNtgbdS0MbtHgIYdZMIdS3xLEJCxaKih7ZFjWABGcAG+gWG4GHV xlPbKNxhPuoJeuYRba5cGGAqJlNZxW8VWxhSYPrxRg75FTOvg3GMFLoRZyHNJht/uP WfFZmRk5Y1bQK1tkJuCHIReDUk0cfmMGRrjTO7gxjMREGLUwBji+34BsZq6XSfxb8e xjJB9XfkvnV/w4BjqJ1q8ZmMbruywVlyqtUoO+n3b8gib7LfJ8MjE+5rD9JYxJPVpN CRbYGI1dBGxNw== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 42164-done Cc: 42164-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-A8qEIfWQtoNwhu9T2Pxn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Brian Cully schreef op zo 24-04-2022 om 19:27 [-0400]: > --8<---------------cut here---------------start------------->8--- > (file-append #~#$gcc:lib =E2=80=9C/lib=E2=80=9D) > --8<---------------cut here---------------end--------------->8--- >=20 > The =E2=80=9Ccorrect=E2=80=9D way is this: > --8<---------------cut here---------------start------------->8--- > (gexp-input (file-append gcc "/lib") "lib") > --8<---------------cut here---------------end--------------->8--- FWIW, I was actually thinking of (file-append (gexp-input gcc "lib") "/lib") (First select the output with 'gexp-input', then append a suffix.) Greetings, Maxime. --=-A8qEIfWQtoNwhu9T2Pxn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmY9yRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7mSCAPwKWvIc4DAN93THkZgbxPIfxJuq dN30/7NT/X4VQQCBwgEAwk6vULzBXY+n+Mg0GV0hy2AhQoqrjT/EMK2GPvexpwc= =676A -----END PGP SIGNATURE----- --=-A8qEIfWQtoNwhu9T2Pxn-- ------------=_1650867722-13820-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 2 Jul 2020 12:00:51 +0000 Received: from localhost ([127.0.0.1]:54495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqxtb-00057L-Bh for submit@debbugs.gnu.org; Thu, 02 Jul 2020 08:00:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:57386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqxtV-00057B-Om for submit@debbugs.gnu.org; Thu, 02 Jul 2020 08:00:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqxtV-0004xY-0d for bug-guix@gnu.org; Thu, 02 Jul 2020 08:00:45 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:58614) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqxtS-0001up-3D for bug-guix@gnu.org; Thu, 02 Jul 2020 08:00:44 -0400 Received: (qmail 26689 invoked by uid 1009); 2 Jul 2020 14:00:32 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25860. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.060242 secs); 02 Jul 2020 12:00:32 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 2 Jul 2020 14:00:31 +0200 Date: Thu, 2 Jul 2020 14:00:29 +0200 From: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= To: bug-guix@gnu.org Subject: Combining file-append with gexps results in incomprehensible errors Message-ID: <20200702120029.vglwgexyasdzhgll@gravity> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wv3iondptoveb6kp" Content-Disposition: inline Received-SPF: none client-ip=37.59.186.212; envelope-from=kuba@kadziolka.net; helo=pat.zlotemysli.pl X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/02 08:00:32 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --wv3iondptoveb6kp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Consider this minimal operating-system definition: (use-modules (gnu)) (use-package-modules gcc) (operating-system (host-name "test") (timezone "UTC") (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (target "/boot/efi"))) (file-systems (cons* (file-system (device (file-system-label "root")) (mount-point "/") (type "ext4")) %base-file-systems)) (packages '()) (services (cons* (service special-files-service-type `(("/lib64" ,(directory-union "rustup-libs" (list (file-append glibc "/lib") (file-append #~#$gcc:lib "/lib"))))= )) %base-services))) I would expect this way of specifying a specific output of a package to work, but it results in the following error: ice-9/boot-9.scm:1515:18: object is not an exception of the right type #<&g= exp-input-error input: #:lib> 7f06c6b06990>> # This also happens when I omit the directory-union: (service special-files-service-type `(("/lib64" ,(file-append #~#$gcc:lib "/lib")))) What *does* work, is this variant with string-append: (service special-files-service-type `(("/lib64" ,#~(string-append #$gcc:lib "/lib")))) However, using it in the directory-union breaks again: (service special-files-service-type `(("/lib64" ,(directory-union "rustup-libs" (list (file-append glibc "/lib") #~(string-append #$gcc:lib "/lib"))= )))) ERROR: In procedure opendir: Wrong type (expecting string): (string-append "/gnu/store/mdxmdhrlkgdik6ay9= pzmmy8mjcbibpwb-gcc-7.5.0-lib" "/lib") builder for `/gnu/store/p5hf7hqxn35fgsb75s5i7326vyzb8jkr-rustup-libs.drv' f= ailed with exit code 1 I have figured out that the following does work: (service special-files-service-type `(("/lib64" ,#~(directory-union "rustup-libs" (list (string-append #$glibc "/lib") (string-append #$gcc:lib "/lib"))= )))) However, I would expect the other variants to work as well. The documentation and error messages are lacking in this regard. Regards, Jakub K=C4=85dzio=C5=82ka --wv3iondptoveb6kp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl79zF0ACgkQ4xWnWEYT FWRBAxAA0rX9+b79yvNhYWwxykCeKv2rd1YxjyEvkQdfNJ1ZUbaVORbc5AhOWrum QBe/74r5HM6Hgt6KHEDRtI3FIR7hAQ+6ufz6w5RkVCiO/pLq3iin6kg/9neDwxVC F6Mo4WXu8bQRg7QUIGTxEwpyrwq2qYYGtNn9FQ5eYxQnx8uziDWOid1N5GPQIWyq jMWBHtMyDbw7F3AYFYh913NV3qPYMym4uKWMHazpBAwf3gF1+o4xnUu1G8MDfSWT k/TvNUNWYNuI7JTvrcmb/i/A0bkCSFgKUMvlqeoyPpwmM1SSjz59/tYZv6xzWrXB Zgp7+f6ksREpIbcs5EMkg1XG9IYXLG/B7HIYHWoV/mAvXA6f3t21q+FoPKfOrwrz bDSkuB1+ZhI8JLFvpC/YQ1a5qKz8pGGsPvcxZ2cqU83eFRIZdWDKXfsObewnjTaF BpqNdIV3WXH97PF7z65dFWc9fG+95IoeLfcZw9YqXt49+45XbzQA1+gkMrAdRY4o 9sdjwCMI/lxppHeUxJn/bHlQx/a6GX9EMHl9VlPYgIUICtPSIQyHw4KB4g3f8fee sUhMOuAYA+6i32P5erRraaaqK/7KUcJm0r1e/0xOJAdtaOeXzia99+6Mj+f6Tcc1 Vru+BWD6SVSwjaY6OgPFjjI8jIcFBdf2frxiwE0+wBArth6hM54= =Ppg3 -----END PGP SIGNATURE----- --wv3iondptoveb6kp-- ------------=_1650867722-13820-1--