all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: zimoun <zimon.toutoune@gmail.com>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: How to write Guix extension?
Date: Wed, 07 Sep 2022 14:25:43 +0200	[thread overview]
Message-ID: <87leqvnzd1.fsf@elephly.net> (raw)
In-Reply-To: <86o7vrzb0n.fsf@gmail.com>


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	other threads:[~2022-09-07 12:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 11:20 How to write Guix extension? zimoun
2022-09-07 12:25 ` Ricardo Wurmus [this message]
2022-09-07 12:36   ` 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

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

  git send-email \
    --in-reply-to=87leqvnzd1.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=guix-devel@gnu.org \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.