From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Jakub Kądziołka" <kuba@kadziolka.net>
Cc: 42164@debbugs.gnu.org
Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors
Date: Mon, 12 Apr 2021 21:58:37 -0400 [thread overview]
Message-ID: <874kgbc5de.fsf@gmail.com> (raw)
In-Reply-To: <20200702120029.vglwgexyasdzhgll@gravity> ("Jakub Kądziołka"'s message of "Thu, 2 Jul 2020 14:00:29 +0200")
Hi Jakub!
Jakub Kądziołka <kuba@kadziolka.net> 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: #<gexp #<gexp-input #<package gcc@7.5.0 gnu/packages/gcc.scm:520 7f06c996c960>:lib> 7f06c6b06990>> #<record-type &package-input-error>
[...]
> 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:
#<gexp-input #<package opendht@2.2.0rc4 /home/maxim/src/guix/gnu/packages/networking.scm:3426 7f2dbcae1aa0>:tools>
From the REPL
(lower-object (gexp (ungexp opendht "tools")))
$17 = #<procedure 7f2db56ed100 at guix/gexp.scm:246:2 (state)>
scheme@(gnu services jami)> ,run-in-store $17
While executing meta-command:
ERROR:
1. &gexp-input-error: #<gexp #<gexp-input #<package opendht@2.2.0rc4
/home/maxim/src/guix/gnu/packages/networking.scm:3426
7f2dbcae1aa0>:tools> 7f2db7427690>
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
next prev parent reply other threads:[~2021-04-13 1:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 12:00 bug#42164: Combining file-append with gexps results in incomprehensible errors Jakub Kądziołka
2021-04-13 1:58 ` Maxim Cournoyer [this message]
2022-04-23 16:03 ` Brian Cully
2022-04-23 17:06 ` Maxime Devos
2022-04-23 17:29 ` Brian Cully
2022-04-23 18:38 ` Maxime Devos
2022-04-23 20:40 ` Brian Cully
2022-04-23 21:07 ` Maxime Devos
2022-04-24 23:27 ` Brian Cully
2022-04-25 6:20 ` Maxime Devos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874kgbc5de.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=42164@debbugs.gnu.org \
--cc=kuba@kadziolka.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).