bug-guix
[Top][All Lists]
Advanced

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

bug#35751: "guix environment -s" doesn't set %current-system in gnu/pack


From: Ludovic Courtès
Subject: bug#35751: "guix environment -s" doesn't set %current-system in gnu/packages
Date: Sat, 18 May 2019 19:19:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Hi Danny,

Danny Milosavljevic <address@hidden> 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’.





reply via email to

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