[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building packages in REPL

From: Julien Lepiller
Subject: Re: Building packages in REPL
Date: Fri, 26 Jun 2020 06:17:55 -0400
User-agent: K-9 Mail for Android

Le 26 juin 2020 06:00:17 GMT-04:00, zimoun <> a écrit :
>On Fri, 26 Jun 2020 at 09:25, Konrad Hinsen
><> wrote:
>> Anthony Quizon <> writes:
>>> Is there a way that I can build a package via the repl?
>Well, it is not what you are asking I guess, but it is possible:
>--8<---------------cut here---------------start------------->8---
>$ guix repl
>scheme@(guix-user)> (use-modules (guix scripts build))
>scheme@(guix-user)> (guix-build "-L" "." "bonjour")
>--8<---------------cut here---------------end--------------->8---
>And there is no '~' expansion so "-L" "~/somewhere" does not work.
>> As far as I know, no. I have been looking for this as well,
>> in order to make package development more interactive.
>Well, I do not know enough the API but it should be added and exposed
>it does not exist yet.  And the question is which level of granularity?
>>> For example,
>>> If I had a channel with a custom package in it, can I do:
>>> `$ guix repl -L .`
>>> `> ,use (my-channel packages base) `
>>> `> (build-package my-package) ;; this is the example imaginary
>command `
>The entry point is "(guix scripts build)".
>> I'd even want more: access to the individual build steps.
>Do you mean the "phases"?
>All the best,

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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]