1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-01 00:07:58 +02:00

Merge pull request #4342 from tweag/fix-remote-build-hook

fix remote build hook
This commit is contained in:
Eelco Dolstra 2020-12-09 12:40:00 +01:00 committed by GitHub
commit 253571e4ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 4 deletions

View file

@ -899,10 +899,8 @@ void DerivationGoal::buildDone()
Logger::Fields{worker.store.printStorePath(drvPath)});
PushActivity pact(act.id);
StorePathSet outputPaths;
for (auto& [_, maybeOutPath] :
worker.store.queryPartialDerivationOutputMap(drvPath)) {
if (maybeOutPath)
outputPaths.insert(*maybeOutPath);
for (auto i : drv->outputs) {
outputPaths.insert(finalOutputs.at(i.first));
}
std::map<std::string, std::string> hookEnvironment = getEnv();
@ -2874,6 +2872,8 @@ void DerivationGoal::registerOutputs()
for (auto & i : drv->outputsAndOptPaths(worker.store)) {
if (!i.second.second || !worker.store.isValidPath(*i.second.second))
allValid = false;
else
finalOutputs.insert_or_assign(i.first, *i.second.second);
}
if (allValid) return;
}