Hello, Le samedi 05 septembre 2020 à 22:40 -0400, Timothy Sample a écrit : > As I understand it, ‘gexp->derivation’ returns a value in the store > monad. I’m not sure why ‘guix build’ doesn’t know how to use it > directly, but you can get at the derivation by wrapping it with > ‘run-with-store’: > > (run-with-store (open-connection) > (gexp->derivation "the-thing" build-exp)) > > Don’t forget to use the ‘(guix store)’ module for this. OK, I think I understand:
"you exit a monad like you exit a building on fire: by running" So, I cannot simply return a monadic value to guix build. It needs a real value. > > But! There’s a better way!! :) > > You can use the “declarative interface”. Just replace > ‘gexp->derivation’ with ‘computed-file’: > > (computed-file "the-thing" build-exp) > > Now there’s no need for ‘(guix store)’. Thank you, that was exactly what I was looking for! divoplade