From: "Ludovic Courtès" <ludo@gnu.org>
To: Brian Kubisiak <brian@kubisiak.com>
Cc: 74633@debbugs.gnu.org
Subject: [bug#74633] [PATCH v3] ui: Search channels for guix extensions
Date: Fri, 10 Jan 2025 20:03:03 +0100 [thread overview]
Message-ID: <87v7umjxug.fsf@gnu.org> (raw)
In-Reply-To: <6a1ff2a779e9cf5248671fc9e62852aa23be3f16.1736299302.git.brian@kubisiak.com> (Brian Kubisiak's message of "Tue, 7 Jan 2025 17:22:35 -0800")
[-- Attachment #1: Type: text/plain, Size: 832 bytes --]
Hello,
Overall it LGTM. I propose the mostly-cosmetic changes below.
Once thing I overlooked before is that commands will have to live under
/guix/extensions, right?
(define (commands)
"Return the list of commands, alphabetically sorted."
(filter-map source-file-command
(append (command-files)
(append-map command-files
(extension-directories)))))
And likewise in ‘run-guix-command’.
But now, if a channel provides ‘guix/scripts/foo.scm’, the ‘guix help’
command will not show ‘foo’ but the ‘guix foo’ command will effectively
work (which wasn’t the case until now).
Maybe it’s fine actually, I don’t know, but I thought this is worth
mentioning and thinking though.
WDYT?
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2198 bytes --]
diff --git a/guix/describe.scm b/guix/describe.scm
index 90c17084d1..819f0fef74 100644
--- a/guix/describe.scm
+++ b/guix/describe.scm
@@ -27,8 +27,8 @@ (define-module (guix describe)
sexp->channel
manifest-entry-channel)
#:use-module (srfi srfi-1)
- #:use-module (srfi srfi-11)
#:use-module (srfi srfi-34)
+ #:use-module (srfi srfi-71)
#:use-module (ice-9 match)
#:export (current-profile
current-profile-date
@@ -194,10 +194,11 @@ (define (package-path-entries)
(define (append-channels-to-load-path!)
"Automatically add channels to Guile's search path. Channels are added to the
-end of the path so they don't override Guix' own modules. This function ensures
-that channels are only added to the search path once even if it is called
-multiple times."
- (let-values (((channels-scm channels-go) (package-path-entries)))
+end of the path so they don't override Guix' own modules.
+
+This procedure ensures that channels are only added to the search path once
+even if it is called multiple times."
+ (let ((channels-scm channels-go (package-path-entries)))
(set! %load-path
(append %load-path channels-scm))
(set! %load-compiled-path
diff --git a/guix/ui.scm b/guix/ui.scm
index 05bc99a7e3..d9d7c8469f 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -38,7 +38,8 @@
(define-module (guix ui) ;import in user interfaces only
#:use-module (guix i18n)
#:use-module (guix colors)
- #:use-module (guix describe)
+ #:autoload (guix describe) (append-channels-to-load-path!
+ package-path-entries)
#:use-module (guix diagnostics)
#:use-module (guix gexp)
#:use-module (guix sets)
@@ -2200,9 +2201,8 @@ (define (extension-directories)
(filter file-exists?
(parse-path
(getenv "GUIX_EXTENSIONS_PATH")
- (map
- (cut string-append <> "/guix/extensions")
- channels)))))
+ (map (cut string-append <> "/guix/extensions")
+ channels)))))
(define (commands)
"Return the list of commands, alphabetically sorted."
next prev parent reply other threads:[~2025-01-10 19:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-01 14:53 [bug#74633] [PATCH] ui: Search channels for guix extensions Brian Kubisiak
2024-12-02 17:25 ` Ludovic Courtès
2024-12-03 11:29 ` Carlo Zancanaro
2024-12-04 0:59 ` Brian Kubisiak
2024-12-05 0:27 ` Carlo Zancanaro via Guix-patches via
2024-12-08 22:03 ` [bug#74633] [PATCH v2] " Brian Kubisiak
2024-12-26 21:08 ` Ludovic Courtès
2025-01-08 1:29 ` Brian Kubisiak
2025-01-08 1:22 ` [bug#74633] [PATCH v3] " Brian Kubisiak
2025-01-10 19:03 ` Ludovic Courtès [this message]
2025-01-13 23:53 ` Brian Kubisiak
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=87v7umjxug.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=74633@debbugs.gnu.org \
--cc=brian@kubisiak.com \
/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.