all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carlo Zancanaro via Guix-patches via <guix-patches@gnu.org>
To: Brian Kubisiak <brian@kubisiak.com>
Cc: 74633@debbugs.gnu.org
Subject: [bug#74633] [PATCH] ui: Search channels for guix extensions
Date: Thu, 05 Dec 2024 11:27:05 +1100	[thread overview]
Message-ID: <87cyi7q8iu.fsf@sil.org> (raw)
In-Reply-To: <pfuvhwyvbfi2n3higerccakdnylsv7vbadwjjnzay5sejiot3q@ki6cc4wuwcru> (Brian Kubisiak's message of "Tue, 3 Dec 2024 16:59:47 -0800")

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




  reply	other threads:[~2024-12-05 14:55 UTC|newest]

Thread overview: 6+ 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 [this message]
2024-12-08 22:03 ` [bug#74633] [PATCH v2] " 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=87cyi7q8iu.fsf@sil.org \
    --to=guix-patches@gnu.org \
    --cc=74633@debbugs.gnu.org \
    --cc=brian@kubisiak.com \
    --cc=carlo_zancanaro@sil.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.