From: "Ludovic Courtès" <ludo@gnu.org>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: 35751@debbugs.gnu.org
Subject: bug#35751: "guix environment -s" doesn't set %current-system in gnu/packages
Date: Sat, 18 May 2019 19:19:40 +0200 [thread overview]
Message-ID: <87blzzvfwz.fsf@gnu.org> (raw)
In-Reply-To: <20190515173211.5b394c1c@scratchpost.org> (Danny Milosavljevic's message of "Wed, 15 May 2019 17:32:11 +0200")
Hi Danny,
Danny Milosavljevic <dannym@scratchpost.org> skribis:
> when doing "guix environment -s armhf-linux", apparently it doesn't set
> %current-system to "armhf-linux" for packages in gnu/packages at toplevel
> context.
Correct. That’s the way it’s meant to work: the initial value of
‘%current-system’ when files get loaded should not matter.
> That would be convenient for development, f.e. instead of "guix build" I often
> use "guix environment" inside the git checkout of the package. In this case
> it's differing.
Package definitions should refer to ‘%current-system’ only from within
the dynamic extent of a thunked field.
For example, if a package refers to ‘%current-system’ from ‘arguments’,
or from a procedure called from ‘arguments’, everything is fine:
‘%current-system’, at that point, will be bound to whatever was selected
with ‘-s’.
Does that make sense?
Thanks,
Ludo’.
prev parent reply other threads:[~2019-05-18 17:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 15:32 bug#35751: "guix environment -s" doesn't set %current-system in gnu/packages Danny Milosavljevic
2019-05-18 17:19 ` Ludovic Courtès [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=87blzzvfwz.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=35751@debbugs.gnu.org \
--cc=dannym@scratchpost.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).