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: Fri, 28 Aug 2015 11:24:43 +0200 Message-ID: <87si73u5no.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> 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]:48978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVFu0-0003wq-MG for guix-devel@gnu.org; Fri, 28 Aug 2015 05:24:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVFtx-0001FT-Co for guix-devel@gnu.org; Fri, 28 Aug 2015 05:24:52 -0400 In-Reply-To: <87oahuvtah.fsf@gmail.com> (Alex Kost's message of "Wed, 26 Aug 2015 20:44:22 +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: > Ludovic Court=C3=A8s (2015-08-26 14:12 +0300) wrote: > >> Alex Kost skribis: >> >>> Ludovic Court=C3=A8s (2015-08-18 17:15 +0300) wrote: >>> >>>> Alex Kost skribis: >>>> >>>>> * guix/scripts/build.scm (build-package): New procedure. >>>> >>>> [...] >>>> >>>>> +(define (build-package package . build-options) >>>>> + "Build PACKAGE using BUILD-OPTIONS." >>>>> + (with-store store >>>>> + (let* ((drv (run-with-store store >>>>> + (package->derivation package))) >>>>> + (drvs (list drv))) >>>>> + (apply set-build-options store build-options) >>>>> + (show-what-to-build store drvs) >>>>> + (build-derivations store drvs) >>>>> + (show-derivation-outputs drv)))) >>>> >>>> I think this doesn=E2=80=99t fit here because it isn=E2=80=99t actuall= y used by =E2=80=98guix >>>> build=E2=80=99. Maybe keep it in emacs/ for now? >>> >>> If you mean "guix-main.scm", I don't think it's the right place either, >>> as all this guix-devel stuff does not depend on Guix REPL (or on any >>> code from "guix-main.scm" in general). Besides, "guix-main.scm" doesn't >>> provide a module. >>> >>> What about making some additional module?: (guix devel) or something. >>> Other similar code may be put there in future. For example, you are >>> editing a package definition and you may want to download the current >>> origin source. It will probably also require some specific scheme code, >>> which may be added to that module. >> >> Maybe =E2=80=98build-package=E2=80=99 could go to (guix packages)? > > =E2=80=98build-package=E2=80=99 uses =E2=80=98show-=E2=80=A6=E2=80=99 pro= cedures from (guix ui) module. I > thought that adding this module to (guix packages) was not desired, or > is it OK? Right, sorry. So maybe leave in (guix build scripts) with a comment explaining that it doesn=E2=80=99t have a better place and is for use by the Emacs UI. (Make sure to use the monadic style as suggested in a previous message.) Could you send an updated patch? Sorry for the delay and round trips! Ludo=E2=80=99.