Subject: Re: [bug#74633] [PATCH v3] ui: Search channels for guix extensions

From: Ludovic Courtès <[email-masked]>
Date: Fri, 24 Jan 2025 23:32:01 +0100

Hi,

Brian Kubisiak <[email-masked]> skribis:

>> 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.
>
> My intention was to use /guix/extensions since it's the same directory
> structure as existing extensions. I don't have a strong preference
> here, though I think Carlo intended to support /guix/scripts in
> #74425. Maybe it's a good idea to support both?

Yes, it’s probably a good idea to support both.  In that case, the only
thing missing here I think is for ‘commands’ to somehow visit
guix/scripts/*.scm coming from channels.

Thanks,
Ludo’.