bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54711: Bad Documentation Series: 6.1 Specifying Additional Channels


From: Marek Paśnikowski
Subject: bug#54711: Bad Documentation Series: 6.1 Specifying Additional Channels
Date: Sun, 10 Apr 2022 18:27:02 +0200
User-agent: Evolution 3.42.1

```
@node Specifying Additional Channels
@section Specifying Additional Channels

@cindex extending the package collection (channels)
@cindex variant packages (channels)
You can specify @emph{additional channels} to pull from. To use a
channel, write @code{~/.config/guix/channels.scm} to instruct
@command{guix pull} to pull from it @emph{in addition to} or
@emph{instead of} the default Guix channel:

@vindex %default-channels
@lisp
;; Use the literal default.
%default-channels

;; Add a channel to the default.
(cons
  (channel
    (name 'variant-channel)
    (url "https://example.org/variant-channel.git";))
  %default-channels)

;; Replace Guix repository with a local copy.
(list
  (channel
    (name 'guix)
    (url "file:///home/user/src/guix")))
@end lisp

@noindent
Note that the snippets above are (as always!)@: Scheme code; we use
@code{cons} to add a channel to the list of channels that the variable
@code{%default-channels} is bound to (@pxref{Pairs, @code{cons} and
lists,, guile, GNU Guile Reference Manual}). With this file in place,
@command{guix pull} builds not only Guix, but also the package modules
from the added repositories. The result in
@file{~/.config/guix/current} is the union of Guix with the added
package modules:

@example
$ guix pull --list-generations
@dots{}
Generation 19   Aug 27 2018 16:20:48
  guix d894ab8
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: d894ab8e9bfabcefa6c49d9ba2e834dd5a73a300
  variant-channel dd3df5e
    repository URL: https://example.org/variant-channel.git
    branch: master
    commit: dd3df5e2c8818760a8fc0bd699e55d3b69fef2bb
  11 new packages: variant-gimp, variant-emacs-with-cool-features,
@dots{}
  4 packages upgraded: emacs-racket-mode@@0.0.2-2.1b78827, @dots{}
@end example

@noindent
The output of @command{guix pull} above shows that Generation@tie{}19
includes both Guix and packages the @code{variant-channel} channel.
Among the new and upgraded packages that are listed, some like
@code{variant-gimp} and @code{variant-emacs-with-cool-features} might
come from @code{variant-channel}, while others come from the Guix
default channel.

@noindent
Don't forget, that the chanels can have more options specified, such as
authentication. Read the following pages to learn more about the
options.
```

I just checked, and the `file:///` prefix was accepted by Guix.I was
not aware of the "prefix thing". This is one of many assumptions which
trip up unprepared readers.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]