Hi Alex,

Alex ter Weele <[email protected]> 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’.

Reply via email to