Hi Julien, On Fri, 26 Jun 2020 at 06:17, Julien Lepiller <jul...@lepiller.eu> wrote:
> One way to do this with the guix API is to get the derivation, then build it: > > (use-modules (guix derivations) (guix store) (gnu packages bash)) > (define package bash-minimal) > (define store (open-connection)) > (define der (package-derivation store package)) > (build-derivations store (list der)) > > Is that what you want? Yes, but provides something like: --8<---------------cut here---------------start------------->8--- (use-modules (guix store) (guix derivations) (guix packages)) (define (build-packages packages) (with-store store (let ((builds (map (lambda (package) (package-derivation store package)) packages))) (build-derivations store builds)))) (define (build-package package) (build-packages (list package))) --8<---------------cut here---------------end--------------->8--- Because otherwise, you need to know "package-derivation" and "build-derivation" and where they are (I run 'ag' or 'git-grep' to find them which is not handy). And for example, I knew it was possible but it was not "obvious". :-) Cheers, simon