diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-02-26 16:54:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-26 16:54:44 +0100 |
commit | 94637cd7e5b644010ff59271f0f648de9c73dab2 (patch) | |
tree | 5155df30a2c9c865ce6ba41c7078a58e65677d6f /src/libstore/build/entry-points.cc | |
parent | 8d322f3c942165f451959229416f51d54ae24c28 (diff) | |
parent | f54976d77bd144535e9b4844dbdb6bc52eac11fd (diff) |
Merge pull request #4477 from NixOS/ca/build-remote
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..3a05a022c 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") && !derivationHasKnownOutputPaths(drv.type())) { + auto realisation = this->queryRealisation(outputId); + if (realisation) + result.builtOutputs.insert_or_assign( + outputId, + *realisation + ); + } + } return result; } |