Often you may want to answer questions like: “Which revision of Guix am I
using?” or “Which channels am I using?” This is useful information in many
situations: if you want to replicate an environment on a different
machine or user account, if you want to report a bug or to determine what
change in the channels you are using caused it, or if you want to record your
system state for reproducibility purposes. The
command answers these questions.
When run from a
displays the channel(s) that it was built from, including their repository URL
and commit IDs (see Channels):
$ guix describe Generation 10 Sep 03 2018 17:32:44 (current) guix e0fa68c repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: e0fa68c7718fffd33d81af415279d6ddb518f727
If you’re familiar with the Git version control system, this is similar in
git describe; the output is also similar to that of
guix pull --list-generations, but limited to the current generation
(see the --list-generations option). Because
the Git commit ID shown above unambiguously refers to a snapshot of Guix, this
information is all it takes to describe the revision of Guix you’re using, and
also to replicate it.
To make it easier to replicate Guix,
guix describe can also be asked
to return a list of channels instead of the human-readable description above:
$ guix describe -f channels (list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") (commit "e0fa68c7718fffd33d81af415279d6ddb518f727") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
You can save this to a file and feed it to
guix pull -C on some
other machine or at a later point in time, which will instantiate this
exact Guix revision (see the -C option).
From there on, since you’re able to deploy the same revision of Guix, you can
just as well replicate a complete software environment. We humbly
think that this is awesome, and we hope you’ll like it too!
The details of the options supported by
guix describe are as
Produce output in the specified format, one of:
produce human-readable output;
produce a list of channel specifications that can be passed to
pull -C or installed as ~/.config/guix/channels.scm (see Invoking
channels, but omit the
introduction field; use it to
produce a channel specification suitable for Guix version 1.1.0 or
introduction field has to do with channel
authentication (see Channel Authentication) and is not
supported by these older versions;
produce a list of channel specifications in JSON format;
produce a list of channel specifications in Recutils format.
Display available formats for --format option.
Display information about profile.