all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Zhu Zihao <all_but_last@163.com>
To: 44630@debbugs.gnu.org
Subject: [bug#44630] [PATCH] channels: Expose the default channel in %default-channel
Date: Sat, 14 Nov 2020 20:07:34 +0800	[thread overview]
Message-ID: <86ft5cp2ex.fsf@163.com> (raw)


[-- 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

             reply	other threads:[~2020-11-14 12:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14 12:07 Zhu Zihao [this message]
2020-11-26 22:38 ` [bug#44630] [PATCH] channels: Expose the default channel in %default-channel Ludovic Courtès
2020-11-27  2:19   ` Zhu Zihao
2020-11-27  9:58     ` bug#44630: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ft5cp2ex.fsf@163.com \
    --to=all_but_last@163.com \
    --cc=44630@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.