unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#35751: "guix environment -s" doesn't set %current-system in gnu/packages
@ 2019-05-15 15:32 Danny Milosavljevic
  2019-05-18 17:19 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Danny Milosavljevic @ 2019-05-15 15:32 UTC (permalink / raw)
  To: 35751

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]

Hi,

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.

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.

Should it?


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#35751: "guix environment -s" doesn't set %current-system in gnu/packages
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2019-05-18 17:19 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 35751

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’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-18 17:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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).