channels: Expose the default channel in %default-channel.

* guix/channels(%default-guix-channel): New variable taken from the inner of
%default-channels.

(%default-channels): Refactored.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Zhu Zihao 2020-11-27 10:16:29 +08:00 committed by Ludovic Courtès
parent 8ea2d7c2fa
commit 16c7472b33
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -72,6 +72,7 @@ (define-module (guix channels)
openpgp-fingerprint->bytevector
openpgp-fingerprint
%default-guix-channel
%default-channels
guix-channel?
@ -170,13 +171,16 @@ (define %default-channel-url
;; URL of the default 'guix' channel.
"https://git.savannah.gnu.org/git/guix.git")
(define %default-guix-channel
(channel
(name 'guix)
(branch "master")
(url %default-channel-url)
(introduction %guix-channel-introduction)))
(define %default-channels
;; Default list of channels.
(list (channel
(name 'guix)
(branch "master")
(url %default-channel-url)
(introduction %guix-channel-introduction))))
(list %default-guix-channel))
(define (guix-channel? channel)
"Return true if CHANNEL is the 'guix' channel."