diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-02-04 00:31:33 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-02-04 00:33:21 +0100 |
commit | bd383d1b6f91c4fe7ac21c52771e92027f649fa0 (patch) | |
tree | 6845b5d2f709df2cbf06bca8de67cdab075902d2 /src/nix-env/user-env.cc | |
parent | 4c755c3b3fc427afe192d223b37c288c88cc57d5 (diff) |
Make most calls to determinePos() lazy
Diffstat (limited to 'src/nix-env/user-env.cc')
-rw-r--r-- | src/nix-env/user-env.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-env/user-env.cc b/src/nix-env/user-env.cc index 727338105..5842e6501 100644 --- a/src/nix-env/user-env.cc +++ b/src/nix-env/user-env.cc @@ -129,7 +129,7 @@ bool createUserEnv(EvalState & state, DrvInfos & elems, /* Evaluate it. */ debug("evaluating user environment builder"); - state.forceValue(topLevel, topLevel.determinePos(noPos)); + state.forceValue(topLevel, [&]() { return topLevel.determinePos(noPos); }); PathSet context; Attr & aDrvPath(*topLevel.attrs->find(state.sDrvPath)); auto topLevelDrv = state.store->parseStorePath(state.coerceToPath(*aDrvPath.pos, *aDrvPath.value, context)); |