From 9550c3862fb4bb021b977b47b5e710c0cdf6c74e Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 30 Jan 2023 07:05:35 -0500 Subject: [PATCH] Remove unneeded argument for `mkOutputString` --- src/libexpr/primops.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 0be39fa7d..017aa25d1 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -145,10 +145,9 @@ static void mkOutputString( EvalState & state, BindingsBuilder & attrs, const StorePath & drvPath, - const BasicDerivation & drv, const std::pair & o) { - auto optOutputPath = o.second.path(*state.store, drv.name, o.first); + auto optOutputPath = o.second.path(*state.store, Derivation::nameFromPath(drvPath), o.first); attrs.alloc(o.first).mkString( optOutputPath ? state.store->printStorePath(*optOutputPath) @@ -193,7 +192,7 @@ static void import(EvalState & state, const PosIdx pos, Value & vPath, Value * v state.mkList(outputsVal, drv.outputs.size()); for (const auto & [i, o] : enumerate(drv.outputs)) { - mkOutputString(state, attrs, *storePath, drv, o); + mkOutputString(state, attrs, *storePath, o); (outputsVal.listElems()[i] = state.allocValue())->mkString(o.first); } @@ -1405,7 +1404,7 @@ drvName, Bindings * attrs, Value & v) NixStringContextElem::DrvDeep { .drvPath = drvPath }, }); for (auto & i : drv.outputs) - mkOutputString(state, result, drvPath, drv, i); + mkOutputString(state, result, drvPath, i); v.mkAttrs(result); }