From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#35751: "guix environment -s" doesn't set %current-system in gnu/packages Date: Sat, 18 May 2019 19:19:40 +0200 Message-ID: <87blzzvfwz.fsf@gnu.org> References: <20190515173211.5b394c1c@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:47465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hS307-0002WR-1N for bug-guix@gnu.org; Sat, 18 May 2019 13:20:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hS306-0005dC-7n for bug-guix@gnu.org; Sat, 18 May 2019 13:20:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47585) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hS306-0005d5-4Q for bug-guix@gnu.org; Sat, 18 May 2019 13:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hS305-0007hc-VU for bug-guix@gnu.org; Sat, 18 May 2019 13:20:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20190515173211.5b394c1c@scratchpost.org> (Danny Milosavljevic's message of "Wed, 15 May 2019 17:32:11 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Danny Milosavljevic Cc: 35751@debbugs.gnu.org Hi Danny, Danny Milosavljevic 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=E2=80=99s the way it=E2=80=99s meant to work: the initial va= lue of =E2=80=98%current-system=E2=80=99 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 c= ase > it's differing. Package definitions should refer to =E2=80=98%current-system=E2=80=99 only = from within the dynamic extent of a thunked field. For example, if a package refers to =E2=80=98%current-system=E2=80=99 from = =E2=80=98arguments=E2=80=99, or from a procedure called from =E2=80=98arguments=E2=80=99, everything is = fine: =E2=80=98%current-system=E2=80=99, at that point, will be bound to whatever= was selected with =E2=80=98-s=E2=80=99. Does that make sense? Thanks, Ludo=E2=80=99.