GNU bug report logs -
#45632
[PATCH] guix package: Warn if uses has 'guix' package in profile.
Previous Next
Full log
View this message in rfc822 format
zimoun <zimon.toutoune <at> gmail.com> writes:
>> > Once the story about extension is good enough,
>>
>> As in adding your own commands under the 'guix $CMD' namespace, or
>> something more sophisticated? For the former, git seems to have a quite
>> good mechanism - we could borrow that.
>
> From my understanding, Git use shell tricks and cannot be borrowed.
> The idea is to have "guix <foo>"; for details, see the recent patch
> about extensions by Ricardo and discussion on #guix-hpc (because GWL
> is an extension).
This is a solved problem as far as I’m concerned. (It still needs to be
documented in the manual and maybe in the cookbook.)
You need to set GUIX_EXTENSIONS_PATH to a location that contains a Guile
module “(guix extensions my-command)” that defines “my-command” with
“define-command” (so it needs to import (guix scripts)). The category
should be “extension” (it’s a new category that has been added
recently).
As long as that’s the case Guix will be able to list it in “guix --help”
and execute it.
Here is the entry point of the Guix Workflow Language, which uses this
very mechanism:
https://git.savannah.gnu.org/cgit/gwl.git/tree/guix/extensions/workflow.scm.in
--
Ricardo
This bug report was last modified 4 years and 157 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.