guix-devel
[Top][All Lists]
Advanced

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

Re: How to write Guix extension?


From: Ricardo Wurmus
Subject: Re: How to write Guix extension?
Date: Wed, 07 Sep 2022 14:25:43 +0200
User-agent: mu4e 1.8.7; emacs 28.1

zimoun <zimon.toutoune@gmail.com> writes:

> For instance, this ’hello’ extension reads:
>
> $ GUIX_EXTENSIONS_PATH=/tmp/example/guix/extensions guix hello
> hello
> path: "/tmp/example/my"
> load-path: 
>   "/tmp/example/my"

This is not correct.  It should be /tmp/example.

> I have tried
>
>     (apply (@ (my top) from-top))

…and then this will work.

> (define (my-path)
>   (canonicalize-path
>    (string-append (dirname (current-filename)) "/../../my")))

The problem lies right here.  Remove the trailing “my”.

Works for me with these changes.  What doesn’t work is

    (use-modules (my top))
    (from-top)

but

    ((@ (my top) from-top))

works fine.

-- 
Ricardo



reply via email to

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