From cb9c7cac6bb527904db44ffc75bd8049a6503be5 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Fri, 3 Nov 2023 16:00:52 +1300 Subject: [PATCH] Fix iterating over input derivation outputs --- src/nix-eval-jobs.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index f7e2903..4dfcdb8 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -241,8 +241,13 @@ struct Drv { drvPath = localStore->printStorePath(drvInfo.requireDrvPath()); auto drv = localStore->readDerivation(drvInfo.requireDrvPath()); - for (auto &input : drv.inputDrvs) { - inputDrvs[localStore->printStorePath(input.first)] = input.second; + for (const auto &[inputDrvPath, inputNode] : drv.inputDrvs.map) { + std::set inputDrvOutputs; + for (auto &outputName : inputNode.value) { + inputDrvOutputs.insert(outputName); + } + inputDrvs[localStore->printStorePath(inputDrvPath)] = + inputDrvOutputs; } name = drvInfo.queryName(); system = drv.platform;