Commit 6940e853 authored by Ambrevar's avatar Ambrevar

guix-profiles: Add section on required packages.

parent 7944c60b
Pipeline #91164355 passed with stages
in 1 minute and 22 seconds
......@@ -2,9 +2,6 @@
#+AUTHOR: Pierre Neidhardt
#+select_tags: Functional package management, Reproducibility, User interfaces, Customization, Software development, Cookbook
# TODO: Add pitfalls, e.g. the need for pkg-config or info-reader so that env
# variables are set.
/Note: An updated version of this article is available in the [[][cookbook]]./
Guix provides a very useful feature that may be quite foreign to newcomers:
......@@ -141,7 +138,7 @@ without "polluting" the rest of the user session:
GUIX_PROFILE="path/to/my-project" ; . "$GUIX_PROFILE"/etc/profile
The key to enabling a profile is to "source" its =etc/profile= file. That file
The key to enabling a profile is to /source/ its =etc/profile= file. This file
contains shell code that exports the right environment variables necessary to
activate the software contained in the profile. It is built automatically by
Guix and meant to be sourced.
......@@ -151,7 +148,7 @@ It contains the same variables you would get if you ran:
guix package --search-paths=prefix --profile=$my_profile"
Once again, see [[][(guix) Invoking guix package)]] for the command line options.
Once again, see [[][(guix) Invoking guix package]] for the command line options.
To upgrade a profile, simply install the manifest again:
......@@ -182,6 +179,29 @@ You can roll-back to any generation of a given profile:
guix package -p $GUIX_EXTRA_PROFILES/my-project/my-project --switch-generations=17
* Required packages
Activating a profile essentially boils down to exporting a bunch of
environmental variables. This is the role of the =etc/profile= within the
/Note: Only the environmental variables of the packages that consume them will
be set./
For instance, =MANPATH= won't be set if there is no consumer application for man
pages within the profile. So if you need to transparently access man pages once
the profile is loaded, you've got two options:
- Export the variable manually, e.g.
#+begin_src sh
export MANPATH=/path/to/profile${MANPATH:+:}$MANPATH"
- Include =man-db= to the profile manifest.
The same is true for =INFOPATH= (you can install =info-reader=),
=PKG_CONFIG_PATH= (install =pkg-config=), etc.
* Default profile
What about the default profile that Guix keeps in =~/.guix-profile=?
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment