unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: zimoun <zimon.toutoune@gmail.com>
Cc: kuba@kadziolka.net, 45632@debbugs.gnu.org
Subject: [bug#45632] [PATCH] guix package: Warn if uses has 'guix' package in profile.
Date: Thu, 07 Jan 2021 21:31:53 +0100	[thread overview]
Message-ID: <87y2h4fpza.fsf@elephly.net> (raw)
In-Reply-To: <CAJ3okZ1WsK+YtJd5sNBkJKG2ozBCRjuSDy-WveJxf7ZoVmDasg@mail.gmail.com>


zimoun <zimon.toutoune@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




  reply	other threads:[~2021-01-07 20:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-03 18:32 [bug#45632] [PATCH] guix package: Warn if uses has 'guix' package in profile Jakub Kądziołka
2021-01-07 16:39 ` zimoun
2021-01-07 17:11   ` Jakub Kądziołka
2021-01-07 17:46     ` zimoun
2021-01-07 20:31       ` Ricardo Wurmus [this message]
2021-01-07 17:15 ` Tobias Geerinckx-Rice via Guix-patches via
2021-01-07 17:56   ` zimoun
2021-01-07 17:58     ` Jakub Kądziołka
2021-01-07 19:25       ` zimoun

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2h4fpza.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=45632@debbugs.gnu.org \
    --cc=kuba@kadziolka.net \
    --cc=zimon.toutoune@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).