GNU bug report logs - #45632
[PATCH] guix package: Warn if uses has 'guix' package in profile.

Previous Next

Package: guix-patches;

Reported by: Jakub Kądziołka <kuba <at> kadziolka.net>

Date: Sun, 3 Jan 2021 18:33:02 UTC

Severity: normal

Tags: patch

Full log


Message #41 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: Jakub Kądziołka <kuba <at> kadziolka.net>,
 45632 <at> debbugs.gnu.org, guix-patches <at> gnu.org
Subject: Re: [bug#45632] [PATCH] guix package: Warn if uses has 'guix'
 package in profile.
Date: Thu, 07 Jan 2021 21:31:53 +0100
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.