Occasionally you’re grumpy because substitutes are lacking and you end
up building packages by yourself (see Substitutes). The
guix weather command reports on substitute availability on the
specified servers so you can have an idea of whether you’ll be grumpy
today. It can sometimes be useful info as a user, but it is primarily
useful to people running
guix publish (see Invoking guix publish).
Here’s a sample run:
$ guix weather --substitute-urls=https://guix.example.org computing 5,872 package derivations for x86_64-linux... looking for 6,128 store items on https://guix.example.org.. updating substitutes from 'https://guix.example.org'... 100.0% https://guix.example.org 43.4% substitutes available (2,658 out of 6,128) 7,032.5 MiB of nars (compressed) 19,824.2 MiB on disk (uncompressed) 0.030 seconds per request (182.9 seconds in total) 33.5 requests per second 9.8% (342 out of 3,470) of the missing items are queued 867 queued builds x86_64-linux: 518 (59.7%) i686-linux: 221 (25.5%) aarch64-linux: 128 (14.8%) build rate: 23.41 builds per hour x86_64-linux: 11.16 builds per hour i686-linux: 6.03 builds per hour aarch64-linux: 6.41 builds per hour
As you can see, it reports the fraction of all the packages for which
substitutes are available on the server—regardless of whether
substitutes are enabled, and regardless of whether this server’s signing
key is authorized. It also reports the size of the compressed archives
(“nars”) provided by the server, the size the corresponding store
items occupy in the store (assuming deduplication is turned off), and
the server’s throughput. The second part gives continuous integration
(CI) statistics, if the server supports it. In addition, using the
guix weather can list “important”
package substitutes missing on the server (see below).
To achieve that,
guix weather queries over HTTP(S) meta-data
(narinfos) for all the relevant store items. Like
challenge, it ignores signatures on those substitutes, which is
innocuous since the command only gathers statistics and cannot install
The general syntax is:
guix weather options… [packages…]
When packages is omitted,
guix weather checks the availability
of substitutes for all the packages, or for those specified with
--manifest; otherwise it only considers the specified packages. It
is also possible to query specific system types with --system.
guix weather exits with a non-zero code when the fraction of
available substitutes is below 100%.
The available options are listed below.
urls is the space-separated list of substitute server URLs to query. When this option is omitted, the default set of substitute servers is queried.
Query substitutes for system—e.g.,
option can be repeated, in which case
guix weather will query
substitutes for several system types.
Instead of querying substitutes for all the packages, only ask for those
specified in file. file must contain a manifest, as
-m option of
guix package (see Invoking guix package).
This option can be repeated several times, in which case the manifests are concatenated.
Report on substitute coverage for packages: list packages with at least count dependents (zero by default) for which substitutes are unavailable. Dependent packages themselves are not listed: if b depends on a and a has no substitutes, only a is listed, even though b usually lacks substitutes as well. The result looks like this:
$ guix weather --substitute-urls=https://ci.guix.gnu.org https://bordeaux.guix.gnu.org -c 10 computing 8,983 package derivations for x86_64-linux... looking for 9,343 store items on https://ci.guix.gnu.org https://bordeaux.guix.gnu.org... updating substitutes from 'https://ci.guix.gnu.org https://bordeaux.guix.gnu.org'... 100.0% https://ci.guix.gnu.org https://bordeaux.guix.gnu.org 64.7% substitutes available (6,047 out of 9,343) … 2502 packages are missing from 'https://ci.guix.gnu.org https://bordeaux.guix.gnu.org' for 'x86_64-linux', among which: 58 email@example.com /gnu/store/…-kcoreaddons-5.49.0 46 firstname.lastname@example.org /gnu/store/…-qgpgme-1.11.1 37 email@example.com /gnu/store/…-perl-http-cookiejar-0.008 …
What this example shows is that
kcoreaddons and presumably the 58
packages that depend on it have no substitutes at
ci.guix.gnu.org; likewise for
qgpgme and the 46
packages that depend on it.
If you are a Guix developer, or if you are taking care of this build farm, you’ll probably want to have a closer look at these packages: they may simply fail to build.
Display the list of store items for which substitutes are missing.