From a4ef062edcd2a33c6c8c2f062b4b91ca8bf79157 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 16 Apr 2024 15:40:00 +0200 Subject: [PATCH] WIP: delay the flake outPath semantics change for now --- src/libexpr/call-flake.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/libexpr/call-flake.nix b/src/libexpr/call-flake.nix index a411564df5b..629ef428890 100644 --- a/src/libexpr/call-flake.nix +++ b/src/libexpr/call-flake.nix @@ -44,7 +44,18 @@ let overrides.${key}.sourceInfo else # FIXME: remove obsolete node.info. - fetchTree (node.info or {} // removeAttrs node.locked ["dir"]); + let + tree = + fetchTree (node.info or {} // removeAttrs node.locked ["dir"]); + in tree // { + # TODO: return the path value without fetching to the store? + # removing this will improve performance, but may break + # one or two flakes, that rely on + # `builtins.typeOf outPath` for some reason, or perhaps + # something more subtle than that, despite our conservative + # choice of lazy path semantics. + outPath = "${tree.outPath}"; + }; subdir = overrides.${key}.dir or node.locked.dir or "";