guix-patches
[Top][All Lists]
Advanced

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

[bug#44630] [PATCH] channels: Expose the default channel in %default-cha


From: Zhu Zihao
Subject: [bug#44630] [PATCH] channels: Expose the default channel in %default-channel
Date: Sat, 14 Nov 2020 20:07:34 +0800
User-agent: mu4e 1.4.13; emacs 27.1

This expose the inner channel of "%default-channels", this can help user
to override the original guix channel with any mirror more conveniently.

Before:

```
(channel
  (inherit (car %default-channels))
  (url "url/to/mirror"))
```

After:

```
(channel
  (inherit %default-channel)
  (url "https://mirror.guix.org.cn/git/guix";))
```

Attachment: signature.asc
Description: PGP signature

>From 2441a555cf9dab16da8b040ebb8b3ff60ccd1f2c Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Sat, 14 Nov 2020 20:02:47 +0800
Subject: [PATCH] channels: Expose the default channel in %default-channel
 variable.

* guix/channels(%default-channel): New variable taken from the inner of 
%default-channels.
(%default-channels): Refactored.
---
 guix/channels.scm | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/guix/channels.scm b/guix/channels.scm
index 916d663e9f..f78712c895 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -72,6 +72,7 @@
             openpgp-fingerprint->bytevector
             openpgp-fingerprint
 
+            %default-channel
             %default-channels
             guix-channel?
 
@@ -170,13 +171,16 @@ to the corresponding bytevector."
   ;; URL of the default 'guix' channel.
   "https://git.savannah.gnu.org/git/guix.git";)
 
+(define %default-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-channel))
 
 (define (guix-channel? channel)
   "Return true if CHANNEL is the 'guix' channel."
-- 
2.29.2

-- 
Retrieve my PGP public key: https://meta.sr.ht/~citreu.pgp

Zihao

reply via email to

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