diff --git a/lix/libcmd/installables.cc b/lix/libcmd/installables.cc index 1087789ed..02b1554e2 100644 --- a/lix/libcmd/installables.cc +++ b/lix/libcmd/installables.cc @@ -759,7 +759,7 @@ StorePathSet Installable::toDerivations( : throw Error("argument '%s' did not evaluate to a derivation", i->what())); }, [&](const DerivedPath::Built & bfd) { - drvPaths.insert(state.aio.blockOn(resolveDerivedPath(*store, *bfd.drvPath))); + drvPaths.insert(bfd.drvPath->path); }, }, b.path.raw()); diff --git a/lix/libexpr/primops/context.cc b/lix/libexpr/primops/context.cc index d32d9fe2f..4f7c8280c 100644 --- a/lix/libexpr/primops/context.cc +++ b/lix/libexpr/primops/context.cc @@ -127,9 +127,7 @@ void prim_getContext(EvalState & state, Value * * args, Value & v) contextInfos[std::move(d.drvPath)].allOutputs = true; }, [&](NixStringContextElem::Built && b) { - // FIXME should eventually show string context as is, no - // resolving here. - auto drvPath = state.aio.blockOn(resolveDerivedPath(*state.ctx.store, *b.drvPath)); + auto drvPath = b.drvPath->path; contextInfos[std::move(drvPath)].outputs.emplace_back(std::move(b.output)); }, [&](NixStringContextElem::Opaque && o) { diff --git a/lix/libstore/derived-path.cc b/lix/libstore/derived-path.cc index 21262b7aa..d76f973df 100644 --- a/lix/libstore/derived-path.cc +++ b/lix/libstore/derived-path.cc @@ -40,10 +40,7 @@ try { res["drvPath"] = TRY_AWAIT(drvPath->toJSON(store)); // Fallback for the input-addressed derivation case: We expect to always be // able to print the output paths, so let’s do it - // FIXME try-resolve on drvPath - const auto outputMap = TRY_AWAIT( - store.queryPartialDerivationOutputMap(TRY_AWAIT(resolveDerivedPath(store, *drvPath))) - ); + const auto outputMap = TRY_AWAIT(store.queryPartialDerivationOutputMap(drvPath->path)); for (const auto & [output, outputPathOpt] : outputMap) { if (!outputs.contains(output)) continue; if (outputPathOpt) diff --git a/lix/libstore/misc.cc b/lix/libstore/misc.cc index 9c9a74343..134e56669 100644 --- a/lix/libstore/misc.cc +++ b/lix/libstore/misc.cc @@ -474,7 +474,7 @@ try { kj::Promise> resolveDerivedPath(Store & store, const DerivedPath::Built & bfd, Store * evalStore_) try { - auto drvPath = TRY_AWAIT(resolveDerivedPath(store, *bfd.drvPath, evalStore_)); + auto drvPath = bfd.drvPath->path; auto outputsOpt_ = TRY_AWAIT(store.queryPartialDerivationOutputMap(drvPath, evalStore_)); @@ -523,7 +523,7 @@ try { // NOLINTNEXTLINE(cppcoreguidelines-avoid-capturing-lambda-coroutines) [&](const SingleDerivedPath::Built & bfd) -> kj::Promise> { try { - auto drvPath = TRY_AWAIT(resolveDerivedPath(store, *bfd.drvPath, evalStore_)); + auto drvPath = bfd.drvPath->path; auto outputPaths = TRY_AWAIT(evalStore.queryPartialDerivationOutputMap(drvPath, evalStore_)); if (outputPaths.count(bfd.output) == 0) diff --git a/lix/libstore/remote-store.cc b/lix/libstore/remote-store.cc index 1d20b2150..e996cfd75 100644 --- a/lix/libstore/remote-store.cc +++ b/lix/libstore/remote-store.cc @@ -748,7 +748,7 @@ try { }; OutputPathMap outputs; - auto drvPath = TRY_AWAIT(resolveDerivedPath(*evalStore, *bfd.drvPath)); + auto drvPath = bfd.drvPath->path; auto drv = TRY_AWAIT(evalStore->readDerivation(drvPath)); const auto outputHashes = TRY_AWAIT(staticOutputHashes(*evalStore, drv)); // FIXME: expensive diff --git a/lix/nix/log.cc b/lix/nix/log.cc index d420fa90e..31f53c6da 100644 --- a/lix/nix/log.cc +++ b/lix/nix/log.cc @@ -34,15 +34,14 @@ struct CmdLog : InstallableCommand auto b = installable->toDerivedPath(*getEvaluator()->begin(aio())); // For compat with CLI today, TODO revisit - auto oneUp = std::visit(overloaded { + auto path = std::visit(overloaded { [&](const DerivedPath::Opaque & bo) { - return make_ref(bo); + return bo.path; }, [&](const DerivedPath::Built & bfd) { - return bfd.drvPath; + return bfd.drvPath->path; }, }, b.path.raw()); - auto path = aio().blockOn(resolveDerivedPath(*store, *oneUp)); RunPager pager; for (auto & sub : subs) {