David Thompson <dthomps...@worcester.edu> 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’s even better if someone else does it. :-) > From d506ad1d8824cc694364be502acddb25b76d0020 Mon Sep 17 00:00:00 2001 > From: David Thompson <dthomps...@worcester.edu> > 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 ‘load*’ and s/Read/Load/ in the docstring? It’s really a variant of ‘load’ rather than a variant of ‘read’. If that’s fine with you, OK to push with this change. > From 5665da9934726ce0a8c4ed358b7f606d917c300a Mon Sep 17 00:00:00 2001 > From: David Thompson <dthomps...@worcester.edu> > 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 <dthomps...@worcester.edu> > 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=@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=FILE create a new profile generation with the manifest > + contained within FILE.")) s/contained within/from/ Also no period at the end. > +# Applying a manifest file > +cat > "$module_dir/manifest.scm"<<EOF > +(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’s going to be nice to be able to use this declarative approach for user profiles, have the file under VC, etc. Thanks! Ludo’.