> Tomas Volf <[email protected]> hat am 15.08.2024 00:24 CEST geschrieben: > > Now, what I do not understand is why this error: > > no code for module (foo) > > is there. I am building guix from %default-channels, why is it even loading > files in the local directory? And how do I make it stop? In this case, I > could > just drop `-L .', but in real code I need the argument to load modules > required > for the system.
When that happened to me, it took me forever to find out, so I'm happy to save you some pain: The -L adds to the *package* module search path. Guix loads all the scm files there to get the package definitions, I'm guessing so there doesn't need to be empty modules with a huge "requires" list of every package-containing module. So I put my package definitions in a subdirectory of the channels directory, add that subdirectory to GUIX_PACKAGE_PATH, and add the channel root directory to GUILE_LOAD_PATH.
