Subject: Re: bug#34590: Effects of GUIX_PACKAGE_PATH and --load-path differ

From: Ludovic Courtès <[email-masked]>
Date: Wed, 06 Mar 2019 18:49:09 +0100

Hi,

Daniel Gerber <[email-masked]> skribis:

>> However, what do /gnu/guix-local-packages/ contain?  I suppose it
>> provides [email-masked]? 
>
> Yes, it provides [email-masked] *plus* its dependency [email-masked]. 
>
>  $ tree /gnu/guix-local-packages/ /gnu/guix-local-packages/ ├── gnu
> │   └── packages │       ├── libevent.scm │       └── node.scm └──
> node-llhttp.patch 

(Looks like your email client automatically splits lines, but I think I
got the above tree right.)

Your local packages use the same module names as those in Guix itself:
(gnu packages …).

You should not do that because modules are unique.  That is, there can
be only one (gnu packages node) module at run time.

It may be that GUIX_PACKAGE_PATH and -L lead to a different (gnu
packages node) being loaded first, but really the core of the problem
IMO is the module name collision.

So my suggestion would be to rename your modules to, say, (daniel
packages …); remember to “mv gnu daniel” as well.

Let me know if that solves the problem!

Thanks,
Ludo’.