unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#44630] [PATCH] channels: Expose the default channel in %default-channel
@ 2020-11-14 12:07 Zhu Zihao
  2020-11-26 22:38 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Zihao @ 2020-11-14 12:07 UTC (permalink / raw)
  To: 44630


[-- Attachment #1.1: Type: text/plain, Size: 338 bytes --]


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 #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 515 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-channels-Expose-the-default-channel-in-default-chann.patch --]
[-- Type: text/x-patch, Size: 1425 bytes --]

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


[-- Attachment #3: Type: text/plain, Size: 71 bytes --]


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

Zihao

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-27  9:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-14 12:07 [bug#44630] [PATCH] channels: Expose the default channel in %default-channel Zhu Zihao
2020-11-26 22:38 ` Ludovic Courtès
2020-11-27  2:19   ` Zhu Zihao
2020-11-27  9:58     ` bug#44630: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).