mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Merge pull request #6544 from ncfavier/getFlake-no-write-lock-file
Do not attempt to write a lock file in builtins.getFlake
This commit is contained in:
commit
78dc64ec1e
2 changed files with 2 additions and 0 deletions
|
@ -723,6 +723,7 @@ static void prim_getFlake(EvalState & state, const PosIdx pos, Value * * args, V
|
||||||
lockFlake(state, flakeRef,
|
lockFlake(state, flakeRef,
|
||||||
LockFlags {
|
LockFlags {
|
||||||
.updateLockFile = false,
|
.updateLockFile = false,
|
||||||
|
.writeLockFile = false,
|
||||||
.useRegistries = !evalSettings.pureEval && fetchSettings.useRegistries,
|
.useRegistries = !evalSettings.pureEval && fetchSettings.useRegistries,
|
||||||
.allowMutable = !evalSettings.pureEval,
|
.allowMutable = !evalSettings.pureEval,
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -163,6 +163,7 @@ nix build -o $TEST_ROOT/result --expr "(builtins.getFlake \"git+file://$flake1Di
|
||||||
# But should succeed in impure mode.
|
# But should succeed in impure mode.
|
||||||
(! nix build -o $TEST_ROOT/result flake2#bar --impure)
|
(! nix build -o $TEST_ROOT/result flake2#bar --impure)
|
||||||
nix build -o $TEST_ROOT/result flake2#bar --impure --no-write-lock-file
|
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.
|
# 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'
|
nix build -o $TEST_ROOT/result $flake2Dir#bar --no-update-lock-file 2>&1 | grep 'requires lock file changes'
|
||||||
|
|
Loading…
Reference in a new issue