From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 6/7] guix build: Add 'build-package'. Date: Tue, 08 Sep 2015 22:10:03 +0200 Message-ID: <87io7ku0ys.fsf@gnu.org> References: <1437814197-6321-1-git-send-email-alezost@gmail.com> <1437814197-6321-7-git-send-email-alezost@gmail.com> <87zj1ou1i0.fsf@gnu.org> <878u972ea9.fsf@gmail.com> <87mvxe8frd.fsf@gnu.org> <87oahuvtah.fsf@gmail.com> <87si73u5no.fsf@gnu.org> <87bndfx6l1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZPFa-0005EX-02 for guix-devel@gnu.org; Tue, 08 Sep 2015 16:12:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZPFY-0001Re-Q6 for guix-devel@gnu.org; Tue, 08 Sep 2015 16:12:17 -0400 In-Reply-To: <87bndfx6l1.fsf@gmail.com> (Alex Kost's message of "Sun, 06 Sep 2015 12:03:38 +0300") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel@gnu.org Alex Kost skribis: > Now about the second patch. At first, I don't agree with it :-). I > added #:dry-run? to =E2=80=98build-package=E2=80=99 procedure as I think = it may be > useful, then I found a nice =E2=80=98maybe-build=E2=80=99 procedure in (g= uix scripts > system), and I just moved it to (guix scripts build) which doesn't seem > right. > > We have some code in (guix scripts =E2=80=A6) that is rather common (I me= an 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 =E2=80=98maybe-build=E2=80=99, =E2=80=98%standa= rd-build-options=E2=80=99, > =E2=80=98set-build-options-from-command-line(*)=E2=80=99, =E2=80=98show-b= uild-options-help=E2=80=99, > perhaps exported procedures from (guix scripts package). And > =E2=80=98build-package=E2=80=99 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 =E2=80=98args-fold*=E2=80=99, =E2=80=98parse-command-line=E2=80= =99, =E2=80=98run-guix-command=E2=80=99, =E2=80=98run-guix=E2=80=99, =E2=80=98guix-main=E2=80=99, and =E2=80=98progr= am-name=E2=80=99 should probably move there as well (unless I=E2=80=99m overlooking something that would prevent this), along with =E2=80=98maybe-build=E2=80=99 and =E2=80=98build-package=E2=80= =99. How does that sound? > From 9ffc27f7a076e4213ef3bee00e5cebad501685ac Mon Sep 17 00:00:00 2001 > From: Alex Kost > 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=3DUTF-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=C3=A8s [...] > +(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 =E2=80=98with-store=E2=80=99 and =E2=80=98run-with-store=E2= =80=99. This should be done on the Emacs side (maybe via the ,run-in-store meta-command?). Thanks, Ludo=E2=80=99.