[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/7] guix build: Add 'build-package'.
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH 6/7] guix build: Add 'build-package'. |
Date: |
Tue, 08 Sep 2015 22:10:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Alex Kost <address@hidden> skribis:
> Now about the second patch. At first, I don't agree with it :-). I
> added #:dry-run? to ‘build-package’ procedure as I think it may be
> useful, then I found a nice ‘maybe-build’ procedure in (guix scripts
> system), and I just moved it to (guix scripts build) which doesn't seem
> right.
>
> We have some code in (guix scripts …) that is rather common (I mean not
> specific to the current module), but there is no better place for it,
> usually because it uses (guix ui).
>
> So what about making (guix scripts) module for such general stuff?
> I think we can move there ‘maybe-build’, ‘%standard-build-options’,
> ‘set-build-options-from-command-line(*)’, ‘show-build-options-help’,
> perhaps exported procedures from (guix scripts package). And
> ‘build-package’ may also go there, WDYT?
>
> Or maybe just put those things into (guix ui)?
(guix ui) has become fat; (guix scripts) sounds like a good idea. Then
things like ‘args-fold*’, ‘parse-command-line’, ‘run-guix-command’,
‘run-guix’, ‘guix-main’, and ‘program-name’ should probably move there
as well (unless I’m overlooking something that would prevent this),
along with ‘maybe-build’ and ‘build-package’.
How does that sound?
> From 9ffc27f7a076e4213ef3bee00e5cebad501685ac Mon Sep 17 00:00:00 2001
> From: Alex Kost <address@hidden>
> Date: Thu, 23 Jul 2015 16:16:41 +0300
> Subject: [PATCH 2/2] guix build: Add 'build-package'.
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> * guix/scripts/system.scm (maybe-build): Move to ...
> * guix/scripts/build.scm: ...here.
> (build-package): New procedure.
>
> Co-authored-by: Ludovic Courtès <address@hidden>
[...]
> +(define* (build-package package
> + #:key (use-substitutes? #t) (dry-run? #f)
> + #:allow-other-keys
> + #:rest build-options)
> + "Build PACKAGE using BUILD-OPTIONS.
> +Show what and how will/would be built."
> + (with-store store
> + (run-with-store store
> + (mbegin %store-monad
> + (apply set-build-options*
Please remove ‘with-store’ and ‘run-with-store’. This should be done on
the Emacs side (maybe via the ,run-in-store meta-command?).
Thanks,
Ludo’.
Re: [PATCH 6/7] guix build: Add 'build-package'., Alex Kost, 2015/09/18