diff options
author | regnat <rg@regnat.ovh> | 2021-01-26 10:50:44 +0100 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2021-02-23 08:04:03 +0100 |
commit | 5687564a27bee692f68a78b897a2d68715f6a3ce (patch) | |
tree | ccad55f3a0bca09ce9f613f01f6af7d829dfa5c3 /src/libstore/build/entry-points.cc | |
parent | 6fbf3fe636bc1d9a9aba4bacb2a70191c1d6b1a7 (diff) |
LocalStore: Send back the new realisations
To allow it to build ca derivations remotely
Diffstat (limited to 'src/libstore/build/entry-points.cc')
-rw-r--r-- | src/libstore/build/entry-points.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/libstore/build/entry-points.cc b/src/libstore/build/entry-points.cc index 9f97d40ba..99b3fa070 100644 --- a/src/libstore/build/entry-points.cc +++ b/src/libstore/build/entry-points.cc @@ -58,6 +58,26 @@ BuildResult Store::buildDerivation(const StorePath & drvPath, const BasicDerivat result.status = BuildResult::MiscFailure; result.errorMsg = e.msg(); } + // XXX: Should use `goal->queryPartialDerivationOutputMap()` once it's + // extended to return the full realisation for each output + auto staticDrvOutputs = drv.outputsAndOptPaths(*this); + auto outputHashes = staticOutputHashes(*this, drv); + for (auto & [outputName, staticOutput] : staticDrvOutputs) { + auto outputId = DrvOutput{outputHashes.at(outputName), outputName}; + if (staticOutput.second) + result.builtOutputs.insert_or_assign( + outputId, + Realisation{ outputId, *staticOutput.second} + ); + if (settings.isExperimentalFeatureEnabled("ca-derivations")) { + auto realisation = this->queryRealisation(outputId); + if (realisation) + result.builtOutputs.insert_or_assign( + outputId, + *realisation + ); + } + } return result; } |