Subject: [bug#45104] pull: Add a "with-substitutes" option.

From: Ludovic Courtès <[email-masked]>
Date: Sun, 31 Jan 2021 17:18:55 +0100

Hi!

Mathieu Othacehe <[email-masked]> skribis:

> From 31dad6456825a329ba0f07c95e3e99258d186a8f Mon Sep 17 00:00:00 2001
> From: Mathieu Othacehe <[email-masked]>
> Date: Fri, 29 Jan 2021 13:48:44 +0100
> Subject: [PATCH v2] guix: channels: Introduce
>  "channel-with-substitutes-available".
>
> * guix/channels.scm (find-latest-commit-with-substitutes,
> channel-with-substitutes-available): New procedures.
> * guix/scripts/pull.scm (guix-pull): Move "channel-list" call inside the
> %current-system parameter scope.
> * doc/guix.texi (Channels with substitutes): New section.

Yay!

> +@node Channels with substitutes
> +@section Channels with substitutes

Should be “Channels With Substitutes”

> +When running @command{guix pull}, Guix will first compile the
> +definitions of every available package.  This is an expensive operation
> +for which substitutes (@pxref{Substitutes}) may be available.  The
> +following snippet in @file{channels.scm} will ensure that @command{guix
> +pull} uses the latest commit with available substitutes for the package
> +definitions.  This is done by querying the continuous integration
               ^
I’d replace the period with a colon and insert the example right here.

> +server at @url{https://ci.guix.gnu.org}.
> +
> +Be careful, this does not mean that all the packages that you will

s/Be careful,/Note that/

> +install after running @command{guix pull} will have available
> +substitutes.  It only ensures that @command{guix pull} will not try to
> +compile package definitions.  This is particularly useful when using
> +machines with limited resources.
> +
> +@lisp
> +(list
> + (channel-with-substitutes-available
    ^
Nipick: maybe move on the previous line.

>  (define-module (guix channels)
>    #:use-module (git)
> +  #:use-module (guix ci)

Could we instead move these two procedures to (guix ci), with an
#:autoload for (guix channels), so that (guix channels) remains focused
on core functionality?

It does mean that in the example above we need to add an explicit
(use-modules (guix ci)).

Otherwise LGTM, thanks!

Ludo’.