[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can I use ()
From: |
Ludovic Courtès |
Subject: |
Re: How can I use () |
Date: |
Tue, 16 Jan 2018 17:11:25 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hi Alex,
Alex ter Weele <address@hidden> skribis:
> Based on this, what I think I want to do is something like:
>
> ,enter-store-monad
> (build (list (gexp->script "test" (backup-home "alex"))))
>
> And then run the resulting script file. However, doing such gives the
> error:
>
> ERROR: In procedure string->utf8:
> ERROR: In procedure string->utf8: Wrong type argument in position 1
> (expecting string): #<procedure 327b030 at guix/gexp.scm:1128:2 (state)>
‘gexp->script’ returns a “monadic” value, so you need to “bind” it with
‘mlet’ or similar to actually access that value:
(mlet %store-monad ((script (gexp->script …)))
(built-derivations (list script)))
Note that the whole result is again a monadic value.
Alternately, instead of fiddling at the REPL, you could do:
guix gc -R $(guix system build config.scm) | grep mcron
then pick the right .drv from there, and run:
guix build ….drv
HTH!
Ludo’.