From: Richard Sent <richard@freakingpenguin.com>
To: jgart <jgart@dismail.de>
Cc: help-guix@gnu.org
Subject: Re: guix.scm and manifest.scm environment
Date: Wed, 10 Jan 2024 22:54:56 -0500 [thread overview]
Message-ID: <7cece08a2a7118209b2f9c1fa74e2162@freakingpenguin.com> (raw)
In-Reply-To: <2c47596ccca2cbf3f6920bcada0ad40e3ec246c0@dismail.de>
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
prev parent reply other threads:[~2024-01-11 4:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 14:45 guix.scm and manifest.scm environment jgart
2024-01-10 10:00 ` Efraim Flashner
2024-01-10 12:18 ` Tomas Volf
2024-01-11 3:54 ` Richard Sent [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7cece08a2a7118209b2f9c1fa74e2162@freakingpenguin.com \
--to=richard@freakingpenguin.com \
--cc=help-guix@gnu.org \
--cc=jgart@dismail.de \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).