feat(tvix): Thread a log sink through calls to buildDerivation
Similarly to how we did for buildPaths, add a std::ostream& log_sink parameter to the build_derivation method on Store, and pass it std::cerr when called at the top level by nix commands - most notably, the build-remote hook binary, so that we get build logs when using tvix as a remote builder. Change-Id: I0f8f729ba8429d4838a0a135a5c2ac1e1a95d575 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2176 Tested-by: BuildkiteCI Reviewed-by: andi <andi@notmuch.email> Reviewed-by: kanepyork <rikingcoding@gmail.com>
This commit is contained in:
parent
1d22874ab2
commit
49024be056
13 changed files with 31 additions and 18 deletions
6
third_party/nix/src/libstore/build.cc
vendored
6
third_party/nix/src/libstore/build.cc
vendored
|
|
@ -4754,11 +4754,11 @@ absl::Status LocalStore::buildPaths(std::ostream& log_sink,
|
|||
return absl::OkStatus();
|
||||
}
|
||||
|
||||
BuildResult LocalStore::buildDerivation(const Path& drvPath,
|
||||
BuildResult LocalStore::buildDerivation(std::ostream& log_sink,
|
||||
const Path& drvPath,
|
||||
const BasicDerivation& drv,
|
||||
BuildMode buildMode) {
|
||||
auto discard_logs = DiscardLogsSink();
|
||||
Worker worker(*this, discard_logs);
|
||||
Worker worker(*this, log_sink);
|
||||
auto goal = worker.makeBasicDerivationGoal(drvPath, drv, buildMode);
|
||||
|
||||
BuildResult result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue