From 169384abb2bcfb687c8ad5959896738a76f3452e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Wed, 18 May 2022 11:33:04 +0200 Subject: Do not attempt to write a lock file in builtins.getFlake Fixes https://github.com/NixOS/nix/issues/6541 --- tests/flakes.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/flakes.sh') diff --git a/tests/flakes.sh b/tests/flakes.sh index 24601784f..9a1f0ab6a 100644 --- a/tests/flakes.sh +++ b/tests/flakes.sh @@ -163,6 +163,7 @@ nix build -o $TEST_ROOT/result --expr "(builtins.getFlake \"git+file://$flake1Di # But should succeed in impure mode. (! nix build -o $TEST_ROOT/result flake2#bar --impure) nix build -o $TEST_ROOT/result flake2#bar --impure --no-write-lock-file +nix eval --expr "builtins.getFlake \"$flake2Dir\"" --impure # Building a local flake with an unlocked dependency should fail with --no-update-lock-file. nix build -o $TEST_ROOT/result $flake2Dir#bar --no-update-lock-file 2>&1 | grep 'requires lock file changes' -- cgit v1.2.3