[Top][All Lists]

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

Re: guix.scm and manifest.scm environment

From: Richard Sent
Subject: Re: guix.scm and manifest.scm environment
Date: Wed, 10 Jan 2024 22:54:56 -0500

On 2024-01-09 09:45, jgart wrote:
Hi Guixers,

Are the modules that are automatically pulled in to a guix.scm or manifest.scm documented?

Those files are just scheme code but specifications->manifest is available in the global namespace, for example.

Note that guix repl manifest.scm will fail due to an unused import. This is special magic when passing a manifest with -m.

Their presence seems to be from how load-manifest in environment.scm works. See that it uses load*, not load, creating a temporary module with the (guix profiles) and (gnu) modules loaded.

We can confirm this with
(display (module-uses (current-module)))

at the top of the manifest. Everything in those two modules is in scope. Similarly, since (gnu) re-exports all (gnu ...) public modules (see gnu.scm), the (gnu packages) module is in scope, so we have specifications->manifest.

I definitely wouldn't rely on this behavior, but that's my understanding of it. Didn't notice any documentation.
Richard Sent

reply via email to

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