aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2022-03-12 00:28:00 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2022-03-18 15:36:11 +0000
commit4d6a3806d24b54f06ddc0cf234ac993db028cf29 (patch)
treef6ad208cc009bd3ea318d47a49c90faa4b557c0e /src/libexpr/primops
parent91adfb8894b4b8183c2948712d56a97bb9d93d9f (diff)
Decode string context straight to using `StorePath`s
I gather decoding happens on demand, so I hope don't think this should have any perf implications one way or the other.
Diffstat (limited to 'src/libexpr/primops')
-rw-r--r--src/libexpr/primops/context.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/primops/context.cc b/src/libexpr/primops/context.cc
index ad4de3840..6ec5e4a74 100644
--- a/src/libexpr/primops/context.cc
+++ b/src/libexpr/primops/context.cc
@@ -82,8 +82,8 @@ static void prim_getContext(EvalState & state, const Pos & pos, Value * * args,
drv = std::string(p, 1);
path = &drv;
} else if (p.at(0) == '!') {
- NixStringContextElem ctx = decodeContext(p);
- drv = ctx.first;
+ NixStringContextElem ctx = decodeContext(*state.store, p);
+ drv = state.store->printStorePath(ctx.first);
output = ctx.second;
path = &drv;
}