From d98a0203b733316a8a5c9440469dfdd10fc9613f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 6 Dec 2023 17:55:49 +0100 Subject: =?UTF-8?q?shell:=20=E2=80=98--development=E2=80=99=20honors=20?= =?UTF-8?q?=E2=80=98--system=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes a bug whereby ‘package->development-manifest’ would run with the wrong system in mind, leading to errors like this: $ guix shell -s i586-gnu -D shepherd --no-grafts guix shell: error: package linux-libre-headers@5.15.49 does not support i586-gnu * guix/scripts/environment.scm (options/resolve-packages): Define ‘system’ and pass it to ‘package->development-manifest’.’ * tests/guix-shell.sh: Test it. Change-Id: I95c471c1918913ab80dec7d3ca64fe38583cce78 --- tests/guix-shell.sh | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/guix-shell.sh b/tests/guix-shell.sh index 2f5fd86809..b2f820bf26 100644 --- a/tests/guix-shell.sh +++ b/tests/guix-shell.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2021-2022 Ludovic Courtès +# Copyright © 2021-2023 Ludovic Courtès # # This file is part of GNU Guix. # @@ -103,6 +103,37 @@ guix shell --bootstrap --pure -D -f "$tmpdir/empty-package.scm" \ guile-bootstrap -- guile --version rm "$tmpdir/empty-package.scm" +# Make sure '--development' honors '--system'. +this_system="$(guile -c '(use-modules (guix utils)) + (display (%current-system))')" +other_system="$(guile -c '(use-modules (guix utils)) + (display (if (string=? "riscv64-linux" (%current-system)) + "x86_64-linux" + "riscv64-linux"))')" +cat > "$tmpdir/some-package.scm" < /dev/null then # Compute the build environment for the initial GNU Make. -- cgit v1.2.3