mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
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.
This commit is contained in:
parent
91adfb8894
commit
4d6a3806d2
7 changed files with 38 additions and 24 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue