1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-22 18:29:36 +01:00

Don't allow __final in fetchTree

It's now only allowed in fetchFinalTree, which is not exposed to users
but only to call-flake.nix.
This commit is contained in:
Eelco Dolstra 2024-11-08 19:27:54 +01:00
parent d90b56d527
commit 4dceca51de
7 changed files with 55 additions and 9 deletions

View file

@ -10,6 +10,9 @@ lockFileStr:
# unlocked trees.
overrides:
# This is `prim_fetchFinalTree`.
fetchTreeFinal:
let
lockFile = builtins.fromJSON lockFileStr;
@ -45,7 +48,7 @@ let
else
# FIXME: remove obsolete node.info.
# Note: lock file entries are always final.
fetchTree (node.info or {} // removeAttrs node.locked ["dir"] // { __final = true; });
fetchTreeFinal (node.info or {} // removeAttrs node.locked ["dir"]);
subdir = overrides.${key}.dir or node.locked.dir or "";