From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: Re: Reproducible profiles Date: Wed, 20 May 2015 12:14:48 -0400 Message-ID: <874mn78buv.fsf@fsf.org> References: <87pp62iqmn.fsf@fsf.org> <87egmd8ui0.fsf@fsf.org> <87pp5va0jx.fsf@gnu.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]:35412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv6eB-000823-0X for guix-devel@gnu.org; Wed, 20 May 2015 12:15:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yv6e4-0002X2-W5 for guix-devel@gnu.org; Wed, 20 May 2015 12:15:06 -0400 In-Reply-To: <87pp5va0jx.fsf@gnu.org> 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s writes: > 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 i= t. > :-) Okay. :) >> 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 doc= string? > It=E2=80=99s really a variant of =E2=80=98load=E2=80=99 rather than a var= iant of =E2=80=98read=E2=80=99. > > If that=E2=80=99s fine with you, OK to push with this change. Done. >> 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. Done. >> 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}./ Done. >> +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 man= ifest >> + contained within FILE.")) > > s/contained within/from/ > > Also no period at the end. Done. >> +# 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 Done. > 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. Me too! Pushed all 3 patches! --=20 David Thompson GPG Key: 0FF1D807