all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jakub Kądziołka" <kuba@kadziolka.net>
To: 42164@debbugs.gnu.org
Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors
Date: Thu, 2 Jul 2020 14:00:29 +0200	[thread overview]
Message-ID: <20200702120029.vglwgexyasdzhgll@gravity> (raw)

[-- Attachment #1: Type: text/plain, Size: 2784 bytes --]

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>

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/mdxmdhrlkgdik6ay9pzmmy8mjcbibpwb-gcc-7.5.0-lib" "/lib")
builder for `/gnu/store/p5hf7hqxn35fgsb75s5i7326vyzb8jkr-rustup-libs.drv' failed 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ądziołka

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2020-07-02 12:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 12:00 Jakub Kądziołka [this message]
2021-04-13  1:58 ` bug#42164: Combining file-append with gexps results in incomprehensible errors Maxim Cournoyer
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200702120029.vglwgexyasdzhgll@gravity \
    --to=kuba@kadziolka.net \
    --cc=42164@debbugs.gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.