guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GUIX_EXTENSIONS_PATH error?


From: zimoun
Subject: Re: GUIX_EXTENSIONS_PATH error?
Date: Fri, 15 Jan 2021 21:55:53 +0100

Hi,

On Fri, 15 Jan 2021 at 21:45, Ricardo Wurmus <rekado@elephly.net> wrote:
> zimoun <zimon.toutoune@gmail.com> writes:
>
>> In the mood for documenting the recent GUIX_EXTENSIONS_PATH, I am
>> missing something because I hit an error.
>
> It’s not your fault.  It’s hard to do this without documentation.

It’s so cool that I would like to document it. ;-)  Sorry to not dive in
the code first.

>> --8<---------------cut here---------------start------------->8---
>> $ cat /tmp/foo/bar.scm
>> (define-module (guix extensions bar)
>>   #:use-module (guix scripts))
>
> This right here is the problem.  The module name and the file name do
> not match.  The file must be
> $GUIX_EXTENSIONS_PATH/guix/extensions/bar.scm and provide the module
> (guix extensions bar).

Ah yeah, that makes sense.  Now, no error but nothing showed:

--8<---------------cut here---------------start------------->8---
$ cat $GUIX_EXTENSIONS_PATH/guix/extensions/bar.scm
(define-module (guix extensions bar)
  #:use-module (guix scripts)
  #:export (guix-bar)
  )


(define-command (guix-bar . args)
  (category extension)
  (synopsis "a bar with beer")

  (pk "dumb"))

$ guix --help | grep bar
--8<---------------cut here---------------end--------------->8---


Cheers,
simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]