@@ -109,14 +109,6 @@ nix build -o "$TEST_ROOT/result" "git+file://$flake1Dir?ref=HEAD#default"
109109nix build -o " $flake1Dir /result" " git+file://$flake1Dir "
110110nix path-info " $flake1Dir /result"
111111
112- # 'getFlake' on an unlocked flakeref should fail in pure mode, but
113- # succeed in impure mode.
114- (! nix build -o " $TEST_ROOT /result" --expr " (builtins.getFlake \" $flake1Dir \" ).packages.$system .default" )
115- nix build -o " $TEST_ROOT /result" --expr " (builtins.getFlake \" $flake1Dir \" ).packages.$system .default" --impure
116-
117- # 'getFlake' on a locked flakeref should succeed even in pure mode.
118- nix build -o " $TEST_ROOT /result" --expr " (builtins.getFlake \" git+file://$flake1Dir ?rev=$hash2 \" ).packages.$system .default"
119-
120112# Regression test for dirOf on the root of the flake.
121113[[ $( nix eval --json flake1#parent) = \" " $NIX_STORE_DIR " \" ]]
122114
@@ -131,12 +123,10 @@ nix build -o "$TEST_ROOT/result" --expr "(builtins.getFlake \"git+file://$flake1
131123# Building a flake with an unlocked dependency should fail in pure mode.
132124(! nix build -o " $TEST_ROOT /result" flake2#bar --no-registries)
133125(! nix build -o " $TEST_ROOT /result" flake2#bar --no-use-registries)
134- (! nix eval --expr " builtins.getFlake \" $flake2Dir \" " )
135126
136127# But should succeed in impure mode.
137128(! nix build -o " $TEST_ROOT /result" flake2#bar --impure)
138129nix build -o " $TEST_ROOT /result" flake2#bar --impure --no-write-lock-file
139- nix eval --expr " builtins.getFlake \" $flake2Dir \" " --impure
140130
141131# Building a local flake with an unlocked dependency should fail with --no-update-lock-file.
142132expect 1 nix build -o " $TEST_ROOT /result" " $flake2Dir #bar" --no-update-lock-file 2>&1 | grep ' requires lock file changes'
0 commit comments