From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <guix-patches-bounces+larch=yhetil.org@gnu.org>
Received: from mp1.migadu.com ([2001:41d0:303:e224::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms13.migadu.com with LMTPS
	id cAarH69zgWdefgEA62LTzQ:P1
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Fri, 10 Jan 2025 19:23:27 +0000
Received: from aspmx1.migadu.com ([2001:41d0:303:e224::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp1.migadu.com with LMTPS
	id cAarH69zgWdefgEA62LTzQ
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Fri, 10 Jan 2025 20:23:27 +0100
X-Envelope-To: larch@yhetil.org
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=eODct34d;
	dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=d7fUTUX4;
	spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=gnu.org
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1736537007;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:cc:mime-version:mime-version:
	 content-type:content-type:resent-cc:resent-from:resent-sender:
	 resent-message-id:in-reply-to:in-reply-to:references:references:
	 list-id:list-help:list-unsubscribe:list-subscribe:list-post:
	 dkim-signature; bh=Iu23VHIf/bKTLJF1Vcua3Z6hfYs0vH6+bgEJeQ2w08g=;
	b=Z+GVaqsK2lTO8tISmDnX1lhFoEu9HcHU6srYGBo/oqt2Ja6vtYEkDdSaavK4x8dnC7Zn6k
	h46rHWKrCSIZpVWmRxh8h/JMPC/zH9bgv+UJg675G5EOFrjfilLCLzgIfhsi3gtrniJ5lA
	ES9ed6/6si0hqwNyO7FTm6XjkeG4fZ97PkZXOOOMrSW2r7UkvzaEyhLjaTm97edGj4LC/O
	SHLmAwnC88xRleUVHF1alyTvje/6kMUl4O+t+8KOzlmsrmksL+EY48q7cCA9rWGIZnstKB
	qFagI8Gfy0QKrDYU02i+Z6PfrD6TNBTHWKf7XTERf/+c8JrcGVIjrsQTz+giIw==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=eODct34d;
	dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=d7fUTUX4;
	spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=gnu.org
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736537007; a=rsa-sha256; cv=none;
	b=IdeR19IDFlvz+5dmUNY/YG3yXdxkyq4c7NcEzEy8DpmkFVlbOGQnJ+fTWvfmNZN88071bD
	W21HpvC/A0AXqOgnwN5Phy4z2p5jUdYgori9/OsIGwp9QepmNfoNw7j+sYbJDwOOgPjN0F
	iOpGPd2pVdT1muLkAeERAPOJog2/HtPT+pezqIu7cCnOuVm7HEtojTzWLzK5mLLXQwBLMe
	ZKh7PyD+gz3TuazsGf1QhGXyS6xMyMhTuzOChnrYPGvvEmbeG7jwmv24dxzE1/bt8YLrfd
	/h0NdiuRKSruZLlux4BITznVXkPWUU64HHW4tQvSe5bDgDJ3G3Vvip8Vg2OsqQ==
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by aspmx1.migadu.com (Postfix) with ESMTPS id 5011F33C04
	for <larch@yhetil.org>; Fri, 10 Jan 2025 20:23:26 +0100 (CET)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <guix-patches-bounces@gnu.org>)
	id 1tWKIf-0001Dk-CZ; Fri, 10 Jan 2025 14:04:05 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1tWKId-0001C2-Hh
 for guix-patches@gnu.org; Fri, 10 Jan 2025 14:04:03 -0500
Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1tWKId-0003Hu-8b
 for guix-patches@gnu.org; Fri, 10 Jan 2025 14:04:03 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=debbugs.gnu.org; s=debbugs-gnu-org; 
 h=MIME-Version:Date:References:In-Reply-To:From:To:Subject;
 bh=Iu23VHIf/bKTLJF1Vcua3Z6hfYs0vH6+bgEJeQ2w08g=; 
 b=eODct34dgQlnM1yJBtDdqQBvFC3huINtnHXgoDscecGESe5eNoMAfMaX8c1IxP3sAHfR68tKVLrdMYUqGtchB/B4eXUm2pycPrAIjurMABCm9O26Tc5jfXpCZ+IrrQx1HINsnRS6ZLJyKK1zAqYH1ek09XI/986RynZxzxH9Pm1z0889YMJYerAq9MCJCHb83iMIwylFfqKIBlV83TVsEbgpD5q9r6c2cvVDlWVJTLUpvNOHt+rb95cMVqCoaXX9fie4hXFJRNmtc2u4MZPTV5UwzQjOrGoQqKyZGITnjrl+G0JynkE8bT8Ekxn7IjaH02LjvnfmQhjFWUvwFa22iw==;
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tWKIc-0002Qv-1i
 for guix-patches@gnu.org; Fri, 10 Jan 2025 14:04:02 -0500
X-Loop: help-debbugs@gnu.org
Subject: [bug#74633] [PATCH v3] ui: Search channels for guix extensions
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: guix-patches@gnu.org
Resent-Date: Fri, 10 Jan 2025 19:04:01 +0000
Resent-Message-ID: <handler.74633.B74633.17365358009271@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 74633
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Brian Kubisiak <brian@kubisiak.com>
Cc: 74633@debbugs.gnu.org
Received: via spool by 74633-submit@debbugs.gnu.org id=B74633.17365358009271
 (code B ref 74633); Fri, 10 Jan 2025 19:04:01 +0000
Received: (at 74633) by debbugs.gnu.org; 10 Jan 2025 19:03:20 +0000
Received: from localhost ([127.0.0.1]:58820 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1tWKHv-0002PT-J0
 for submit@debbugs.gnu.org; Fri, 10 Jan 2025 14:03:20 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:57184)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@gnu.org>) id 1tWKHt-0002P5-85
 for 74633@debbugs.gnu.org; Fri, 10 Jan 2025 14:03:17 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@gnu.org>)
 id 1tWKHn-00039i-LU; Fri, 10 Jan 2025 14:03:11 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=Iu23VHIf/bKTLJF1Vcua3Z6hfYs0vH6+bgEJeQ2w08g=; b=d7fUTUX4MBJzc/1vkuC/
 LoEuMxsVT8O52PSNk8i3zpwQsNrTv9d2wkJ/Vc85W+27NcIj4C+ID14kf7kELvHwhlFrBo43YkYUH
 V2vwCg7vkqgHzVFSon2kmESOh9YPdlFmNcDvGHSMgfsm2HLETTnHc8yOujLppT4h/kBNk243vbTvz
 yCm+kAf2XEJY/Rt8Ov3b4Ac03f5A8bMSAGXtdzu+aFX0ZXEpcDTg3u4RrxDvggrfYu4QS7ro3J/p0
 OxuFWAqseryPmEAakUObEKiSxEWUW9xG4u2L4LXffuEOKkrh2CnHB40Vf4PCE2Y4xvH6NELhK9ztT
 0m1uzyQ0isexSg==;
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@gnu.org>
In-Reply-To: <6a1ff2a779e9cf5248671fc9e62852aa23be3f16.1736299302.git.brian@kubisiak.com>
 (Brian Kubisiak's message of "Tue, 7 Jan 2025 17:22:35 -0800")
References: <2fc5afe876af28643f8074dd1623640cb314cc5e.1733064752.git.brian@kubisiak.com>
 <6a1ff2a779e9cf5248671fc9e62852aa23be3f16.1736299302.git.brian@kubisiak.com>
Date: Fri, 10 Jan 2025 20:03:03 +0100
Message-ID: <87v7umjxug.fsf@gnu.org>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: guix-patches@gnu.org
List-Id: <guix-patches.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-patches>
List-Post: <mailto:guix-patches@gnu.org>
List-Help: <mailto:guix-patches-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=subscribe>
Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org
Sender: guix-patches-bounces+larch=yhetil.org@gnu.org
X-Migadu-Flow: FLOW_IN
X-Migadu-Country: US
X-Migadu-Scanner: mx12.migadu.com
X-Migadu-Spam-Score: -2.47
X-Spam-Score: -2.47
X-Migadu-Queue-Id: 5011F33C04
X-TUID: 4BvTtqeJ2Xgi

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

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 =E2=80=98run-guix-command=E2=80=99.

But now, if a channel provides =E2=80=98guix/scripts/foo.scm=E2=80=99, the =
=E2=80=98guix help=E2=80=99
command will not show =E2=80=98foo=E2=80=99 but the =E2=80=98guix foo=E2=80=
=99 command will effectively
work (which wasn=E2=80=99t the case until now).

Maybe it=E2=80=99s fine actually, I don=E2=80=99t know, but I thought this =
is worth
mentioning and thinking though.

WDYT?

Ludo=E2=80=99.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline

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."

--=-=-=--