aboutsummaryrefslogtreecommitdiff
path: root/src/nix/bundle.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-03-02 10:57:19 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-03-02 23:58:58 +0100
commitb55d79728ccbd2581fa3aa7b2ec7f498aa2285d6 (patch)
tree730a2a80d984d557f3ff0c50da8916f97e6c02af /src/nix/bundle.cc
parent3e3d0711d4c4409172b3e3f342e204d04d554f4b (diff)
Add EvalState::coerceToStorePath() helper
This is useful whenever we want to evaluate something to a store path (e.g. in get-drvs.cc). Extracted from the lazy-trees branch (where we can require that a store path must come from a store source tree accessor).
Diffstat (limited to 'src/nix/bundle.cc')
-rw-r--r--src/nix/bundle.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix/bundle.cc b/src/nix/bundle.cc
index 6b891a6ee..7ed558dee 100644
--- a/src/nix/bundle.cc
+++ b/src/nix/bundle.cc
@@ -97,13 +97,13 @@ struct CmdBundle : InstallableCommand
throw Error("the bundler '%s' does not produce a derivation", bundler.what());
PathSet context2;
- StorePath drvPath = store->parseStorePath(evalState->coerceToPath(*attr1->pos, *attr1->value, context2));
+ auto drvPath = evalState->coerceToStorePath(*attr1->pos, *attr1->value, context2);
auto attr2 = vRes->attrs->get(evalState->sOutPath);
if (!attr2)
throw Error("the bundler '%s' does not produce a derivation", bundler.what());
- StorePath outPath = store->parseStorePath(evalState->coerceToPath(*attr2->pos, *attr2->value, context2));
+ auto outPath = evalState->coerceToStorePath(*attr2->pos, *attr2->value, context2);
store->buildPaths({ DerivedPath::Built { drvPath } });