(address . bug-guix@gnu.org)
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
-----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-----