GNU bug report logs -
#56114
Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string.
Previous Next
Full log
View this message in rfc822 format
Hello!
zimoun <zimon.toutoune <at> gmail.com> skribis:
> However, note that,
>
> scheme@(guix-user)> ,build (plain-file "foo" "bar")
> $1 = "/gnu/store/798sxvdgr0680czdggbls7rd3sfwk2yx-foo"
> scheme@(guix-user)> ,lower (plain-file "foo" "bar")
> $2 = "/gnu/store/798sxvdgr0680czdggbls7rd3sfwk2yx-foo"
>
>
> which is confusing, especially when,
>
> scheme@(guix-user)> ,lower (mixed-text-file "foo" "bar")
> $6 = #<derivation /gnu/store/40982nzm6c7n4yawvs3m39k313jsrl80-foo.drv => /gnu/store/raihpcxdz6wmdpyj67bwd4bjk02xq0x3-foo 7f6f9bc5cd20>
> scheme@(guix-user)> ,build (mixed-text-file "foo" "bar")
> $7 = "/gnu/store/raihpcxdz6wmdpyj67bwd4bjk02xq0x3-foo"
Right, that’s because ‘plain-file’ lowers directly to a store item, not
to a derivation.
I explicitly made “,build” hide that difference; I thought one would
just want “,build” to do the right thing and display the resulting store
item regardless of that kind of detail.
Conversely, “,lower” is for die-hard hackers and it doesn’t hide any
subtlety.
>> +(define* (evaluate/print-with-store mvalue #:key build?)
>> + "Run monadic value MVALUE in the store monad and print its value."
>
> I do not know if it makes sense to have a list of monadic values,
> allowing something like:
>
> ,build hello coreutils
I don’t think the REPL can support this syntax, but we could add support
for:
,build (list hello coreutils)
Thanks for your feedback!
Ludo’.
This bug report was last modified 3 years and 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.