Taking baby steps with Guix (4): the manifests

Guix logo

Summary :

So far, I've shown you how to manage your software packages manually, in profiles, with the guix package command (and its aliases). Each of these transactions creates a new generation of a profile with the changes made.

Now, I'll show you how to generate profiles in a row with what are called manifests!

A manifest is a Guile source file, whose contents look like this:

 ("emacs" "emacs-geiser" "emacs-paredit" "guile"))

This file can then be given as a parameter to the guix package command as follows:

# generates the profile "guile-dev" from the manifest "manifest-guile-dev.scm".
$ guix package --manifest=/path/to/manifest-guile-dev.scm --profile=${HOME}/.profiles-preso/guile-dev

Each time this command is executed, the profile will be regenerated with the latest versions of the listed packages (so it's the same command to install and update the packages)! This is independent of any manual modification of the profile. So, if I generate my profile from a manifest; then add a package to my profile via guix install; then regenerate my profile with the same manifest, the package added with guix install will not be present in the new generation.

To uninstall software, call the guix package command with the manifest in which you've removed the package from the list.

Then, you just have to activate the profile to make the list of software available:

GUIX_PROFILE="${HOME}/.profiles-preso/guile-dev" . "$GUIX_PROFILE"/etc/profile

You can place your manifests under version control and thus share them easily, include them in your software development projects, etc...

Useful links :

Thank you very much for reading this article!

Don't hesitate to give me your opinion, suggest an idea for improvement, or ask a question! To do so, leave a comment below or contact me.

And more importantly, share this blog and tell your friends it's the best blog in the history of Free Software! No kidding!

#guix #gnu #linux #hurd #english