From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <guix-patches-bounces+larch=yhetil.org@gnu.org>
Received: from mp0.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 8DOODOq+UWf7agEAqHPOHw:P1
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Thu, 05 Dec 2024 14:55:38 +0000
Received: from aspmx1.migadu.com ([2001:41d0:303:e224::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp0.migadu.com with LMTPS
	id 8DOODOq+UWf7agEAqHPOHw
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Thu, 05 Dec 2024 15:55:38 +0100
X-Envelope-To: larch@yhetil.org
Authentication-Results: aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=sDB1CdiY;
	dkim=fail ("headers rsa verify failed") header.d=sil.org header.s=google header.b=ZqlcoGhe;
	dmarc=pass (policy=none) header.from=gnu.org;
	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"
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733410537; a=rsa-sha256; cv=none;
	b=q2EryCELrCuBRwiOeSG2gWzRKvsYZYuTCjXf0krNyVxKqJVXFS3jCjOSERArl5zRvjKXru
	DuROMHjye5/D4IsHBeWwsjk03igRvXluQHoGWWSq+Iyfmzvav/qPQTIQvUeK3+y1uL6Pac
	wit1ActVSSVVzH3LPBaipFvQSiRz44XFGjM8Mwkomx21JVQouX625Dw4buwFhweo+S1ehx
	oEQyfF0JHjuue7RER7TV3iM/M3W8kk89rzZE1WdQdziQFdVxlT3HMnCWS992Gl5TL8o9Bw
	MkNlbHnL5Sa2DvEcFgFCS/ex5geoDKZ5F/y7hWeTJKngJLWcLoUXaWZsEeiA/w==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=sDB1CdiY;
	dkim=fail ("headers rsa verify failed") header.d=sil.org header.s=google header.b=ZqlcoGhe;
	dmarc=pass (policy=none) header.from=gnu.org;
	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"
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1733410537;
	h=from:from:sender:sender:reply-to: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=7uFl/3L1Mu4Dtmg5VZAMFK9HOnORoyPS3vh7SCBh+OU=;
	b=SKEnhZXl1+JGKNe5HZQRf6+DEvZuCjIaENtQHOaLo0xUzYdaRC+kWzwphbYKweWcnDkznN
	s4HVvbLhSF15yR/sUNov4JSdFpFc1EFgq/GVMmv9uoDJBgRpcxanJKj9t2fJqEJKC1Yf2R
	j06diH/dWq/FOQQJpz7JjOzlxmwGNZDAmCdw/HfrnDqlBmFzjs/3CjuSDdxy/LspkK3MJh
	o5RsPuf6873pFy3Ks+tHT2o/R4hIRPT/cVAqKQzwso9mJnSPJY3PulcLBk9Bgi1SDT5Smo
	NjaZnwDgPEyVrQ1GCJXDrgUMPDREkF5gml86rW2dCpcHwUNHPP1sSm0wG4e6AQ==
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 AE3403BA8
	for <larch@yhetil.org>; Thu, 05 Dec 2024 15:55:37 +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 1tJDGF-0002Kw-Kh; Thu, 05 Dec 2024 09:55:24 -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 1tJ3dn-0003VF-FC
 for guix-patches@gnu.org; Wed, 04 Dec 2024 23:39: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 1tJ3dn-0002Mf-5E
 for guix-patches@gnu.org; Wed, 04 Dec 2024 23:39: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=7uFl/3L1Mu4Dtmg5VZAMFK9HOnORoyPS3vh7SCBh+OU=; 
 b=sDB1CdiY7jX52QhycL+fERCqt80pHjaR8eovWDnhF0PH+qY6NFC4QM9SWQ6j5LTFQhsbQkXDi4NSe9vkOj9D+LJO/4LrRVm6TiUt+KVCVBdMnqtsGQNJ1NOHb1Qg8hGkJK3BFf4hN2tM6A6pSQpNfoU/k3KsiA1C46Q87leNFjeTW3dfuxZiroNMe6iPC2DCBayipqWEF/UC85/2gmXcCPUNXdGss8apC30TkQdlsSDCK1wT4DCDidrPRE0bVWUGrYFBNxbNwQAdXWKapKtbap5g+RS2D54w/P5z0aafrppSmrxQcDRcoHTgqI+vbRCE4tv5PpRjFjIH6IONQJGaEQ==;
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tJ3dm-0004na-OA
 for guix-patches@gnu.org; Wed, 04 Dec 2024 23:39:02 -0500
X-Loop: help-debbugs@gnu.org
Subject: [bug#74633] [PATCH] ui: Search channels for guix extensions
Resent-From: Carlo Zancanaro <carlo_zancanaro@sil.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: guix-patches@gnu.org
Resent-Date: Thu, 05 Dec 2024 04:39:02 +0000
Resent-Message-ID: <handler.74633.B74633.173337352718408@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.173337352718408
 (code B ref 74633); Thu, 05 Dec 2024 04:39:02 +0000
Received: (at 74633) by debbugs.gnu.org; 5 Dec 2024 04:38:47 +0000
Received: from localhost ([127.0.0.1]:37703 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1tJ3dW-0004ml-Eu
 for submit@debbugs.gnu.org; Wed, 04 Dec 2024 23:38:47 -0500
Received: from mail-pg1-f179.google.com ([209.85.215.179]:58849)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlo_zancanaro@sil.org>) id 1tIzj5-00013J-9r
 for 74633@debbugs.gnu.org; Wed, 04 Dec 2024 19:28:20 -0500
Received: by mail-pg1-f179.google.com with SMTP id
 41be03b00d2f7-7fbc65f6c72so373425a12.1
 for <74633@debbugs.gnu.org>; Wed, 04 Dec 2024 16:28:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=sil.org; s=google; t=1733358429; x=1733963229; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=7uFl/3L1Mu4Dtmg5VZAMFK9HOnORoyPS3vh7SCBh+OU=;
 b=ZqlcoGhe5+7A1yyp9BOKX9wZVW3YtQF6MLjATux3948xWxs6fR4YShjhRW21Er6BGi
 jflT9zMQ6sPeeho1bAPQW+9EtbW2ggVNPL0LJIO7RpND5oMhZbz1n+XOvfUxR63xTh6V
 XHSKTSuCgDKGET8j32AEDknxoHAEkkmzPITNA=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1733358429; x=1733963229;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=7uFl/3L1Mu4Dtmg5VZAMFK9HOnORoyPS3vh7SCBh+OU=;
 b=qSuea5WrTkPZ3kLUebpbdpg3Glvh/o/W9lYhSKeKU0U7f69HljPIvU3xsotkEKcVtI
 jKJQgEJtoLE3RmSxF7CwQ9fdXkuGYcU1VyEiul8eTyYugcps+S57zKPPU9rKImUMKmPJ
 wn8IPptWDbQIH5rF3nvA9W5ejG7JqcQM8lB7q+ZL0vGlaqeP/sRcKiTp0h5Qws6kLnEG
 lkpZEz5ONiadf1ty20y61A7uEaykXYg/NhlMv8MBx8cOUPjfKMlj73CrK6FhiMlK1+oS
 ynzt7Pr7LgEcpLPydFwT1uvY81vOOporpNRLZK3afNsLy83Eruxgw+nja3n3UmfXJbOg
 bdYQ==
X-Gm-Message-State: AOJu0YydrTxLRAC4pZq2nqnB5ioLornUx2NCJjW1AovSRw+3zkuC3jQo
 yfLPYdyCCcDENOs+xxJh5MA75iel+uSWW3C6a4Hqb1TVtalk/klteyBJ+kOoSww1mVQ7wpvXH/M
 oWaIi1OeioX+OYBLalPsr2hzKwgrd7Afxql+QiGukSZkRKXKxhabM0mwwUeAuIUK/WM0mtLCYzK
 SgKJV472DaoXQyrbFHwTfpLNwxFpmLqOWc3CsOB+mPBQ==
X-Gm-Gg: ASbGncueLLNN1o6eZEyQDeYhPKHuv3568IkCF0gTX7aP0cxGMavDq4r8b4c8iwkI+et
 VcmdeYAbiKMgv5EIgLWONCqe+C1mJfbd+82q3tdDC7mBMZJMYX02nhlB8Yq/Q2NPqVadOytmNhb
 5d8r+vNcISNKRo5y4rM9fBnfvTcwEl0ljqLE1kAbAiYKubmb1qv+PzGPRAvtaOswnZz+qaU9fe0
 Ip0q2B46P6L185Vdxb4c5/sEmCi0x/IUH8yW/0M3myXOkbi3Pl2cFWqPF7HQ4Fgjk2sUrGQvwuI
 MR1cScb5/fGcx8Srw7e4xThd
X-Google-Smtp-Source: AGHT+IGdqz6c1XVCQUm7X1YN6B8Kx77KdHocXKEN7lotI9Jt6613Z8Qmp89O1E5vqa5dUgkwSaWqyQ==
X-Received: by 2002:a05:6a20:e605:b0:1e0:cd2a:d80a with SMTP id
 adf61e73a8af0-1e1653a05cemr12230324637.7.1733358429256; 
 Wed, 04 Dec 2024 16:27:09 -0800 (PST)
Received: from squirtle (n203-164-246-111.bla21.nsw.optusnet.com.au.
 [203.164.246.111]) by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-725a2ca671asm84260b3a.153.2024.12.04.16.27.07
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 04 Dec 2024 16:27:08 -0800 (PST)
In-Reply-To: <pfuvhwyvbfi2n3higerccakdnylsv7vbadwjjnzay5sejiot3q@ki6cc4wuwcru>
 (Brian Kubisiak's message of "Tue, 3 Dec 2024 16:59:47 -0800")
References: <2fc5afe876af28643f8074dd1623640cb314cc5e.1733064752.git.brian@kubisiak.com>
 <87mshdknrp.fsf@zancanaro.id.au>
 <pfuvhwyvbfi2n3higerccakdnylsv7vbadwjjnzay5sejiot3q@ki6cc4wuwcru>
Date: Thu, 05 Dec 2024 11:27:05 +1100
Message-ID: <87cyi7q8iu.fsf@sil.org>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Mailman-Approved-At: Wed, 04 Dec 2024 23:38:43 -0500
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-Mailman-Approved-At: Thu, 05 Dec 2024 09:55:21 -0500
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>
Reply-to:  Carlo Zancanaro <carlo_zancanaro@sil.org>
X-ACL-Warn: ,  Carlo Zancanaro via Guix-patches <guix-patches@gnu.org>
From:  Carlo Zancanaro via Guix-patches via <guix-patches@gnu.org>
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-Spam-Score: -2.65
X-Spam-Score: -2.65
X-Migadu-Queue-Id: AE3403BA8
X-Migadu-Scanner: mx12.migadu.com
X-TUID: NzRN2C/FZZPp

On Tue, Dec 03 2024, Brian Kubisiak wrote:
>> That is, if I wanted to add a command "guix foo" I would need to
>> define a module in $channel_dir/guix/extensions/guix/scripts/foo.scm?
>
> This is not required, the command "guix foo" could be defined in
> $channel_dir/guix/extensions/foo.scm. The command-files function
> doesn't add /guix/scripts if a directory is passed as an argument and
>  the run-guix-command function will resolve '(guix extensions foo)
> if foo.scm exists in an extension directory
> (i.e. $channel_dir/guix/extensions/foo.scm exists).

Ah, I see. That sounds good to me.

Given the channel is also being added to %load-path, I expect you can
add a command by defining (guix scripts foo) or (guix extensions foo)
and it will work either way (finding the former first).

We should document this method of extension in the manual. I think a new
section in the "(guix) Channels" chapter for "Declaring Custom Commands"
would be helpful. I might have some time to write something in the next
few days, but if you get a chance before then go ahead.

Thanks for your work on this,

Carlo