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. https://www.gnu.org/software/guile/manual/html_node/Loading.html.
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)))
(force-output)
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