From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Reproducible profiles Date: Wed, 20 May 2015 14:36:02 +0200 Message-ID: <87pp5va0jx.fsf@gnu.org> References: <87pp62iqmn.fsf@fsf.org> <87egmd8ui0.fsf@fsf.org> 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]:53948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv3EK-0004de-My for guix-devel@gnu.org; Wed, 20 May 2015 08:36:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yv3EG-0004kJ-Hm for guix-devel@gnu.org; Wed, 20 May 2015 08:36:12 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv3EG-0004kF-EG for guix-devel@gnu.org; Wed, 20 May 2015 08:36:08 -0400 In-Reply-To: <87egmd8ui0.fsf@fsf.org> (David Thompson's message of "Mon, 18 May 2015 17:07:35 -0400") 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: David Thompson Cc: guix-devel@gnu.org David Thompson skribis: > Below is a new patch set taking into account the feedback received thus > far. The (guix profiles) module still needs to be documented in the > manual, but there's quite a lot of procedures and variables to account > for. Would anyone be intertested in helping with this part? I can help with that, but it=E2=80=99s even better if someone else does it.= :-) > From d506ad1d8824cc694364be502acddb25b76d0020 Mon Sep 17 00:00:00 2001 > From: David Thompson > Date: Mon, 18 May 2015 07:49:44 -0400 > Subject: [PATCH 1/3] ui: Factorize user-provided Scheme file loading. > > * guix/ui.scm (make-user-module, read-scheme-file): New procedures. > * guix/scripts/system.scm (%user-module): Define in terms of > 'make-user-module'. > (read-operating-system): Define in terms of 'read-scheme-file'. [...] > +(define (read-scheme-file file user-module) > + "Read the user provided Scheme source code FILE." What about calling it =E2=80=98load*=E2=80=99 and s/Read/Load/ in the docst= ring? It=E2=80=99s really a variant of =E2=80=98load=E2=80=99 rather than a varia= nt of =E2=80=98read=E2=80=99. If that=E2=80=99s fine with you, OK to push with this change. > From 5665da9934726ce0a8c4ed358b7f606d917c300a Mon Sep 17 00:00:00 2001 > From: David Thompson > Date: Mon, 18 May 2015 07:51:56 -0400 > Subject: [PATCH 2/3] profiles: Add 'packages->manifest' procedure. > > * guix/profiles.scm (packages->manifest): New procedure. [...] > +(define (packages->manifest packages) > + "Convert PACKAGES into a manifest containing entries for all of them." What about something like: Return a list of manifest entries, one for each item listed in PACKAGES. Elements of PACKAGES can be either package objects or package/string tuples denoting a specific output of a package. OK to push with something along these lines. > From 3be657353bfebc33dc9733b820165699ac07b43d Mon Sep 17 00:00:00 2001 > From: David Thompson > Date: Thu, 14 May 2015 21:11:57 -0400 > Subject: [PATCH 3/3] package: Add --manifest option. > > * guix/scripts/package.scm (show-help): Add help text. > (%options): Add manifest option. > (guix-package): Add manifest option handler. > * doc/guix.texi ("Invoking guix package"): Document it. > * tests/guix-package.sh: Add test. [...] > +@item --manifest=3D@var{file} > +@itemx -m @var{file} > +Create a new @dfn{generation} of the profile from the manifest object > +contained in @var{file}, a Scheme source code file. s/contained in.*/returned by the Scheme code in @var{file}./ > +A manifest file may look like this: > + > +@example > +(use-package-modules guile emacs gcc) > + > +(packages->manifest > + (list guile-2.0 > + emacs > + ;; Use a specific package output. > + (list gcc "debug"))) > +@end example Maybe s/gcc/guile-2.0/, which might better illustrate the use case. > + -m, --manifest=3DFILE create a new profile generation with the mani= fest > + contained within FILE.")) s/contained within/from/ Also no period at the end. > +# Applying a manifest file > +cat > "$module_dir/manifest.scm"< +(use-package-modules bootstrap) > + > +(packages->manifest (list %bootstrap-guile)) > +EOF > +guix package --bootstrap -m "$module_dir/manifest.scm" Maybe just add something like: guix package -I | grep guile test `guix package -I | wc -l` -eq 1 OK with these changes! I think it=E2=80=99s going to be nice to be able to= use this declarative approach for user profiles, have the file under VC, etc. Thanks! Ludo=E2=80=99.