about summary refs log tree commit diff
path: root/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/nix-daemon/nix-daemon-proto.cc')
-rw-r--r--third_party/nix/src/nix-daemon/nix-daemon-proto.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
index cbc5452a7177..6d18fc40964f 100644
--- a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
+++ b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
@@ -290,7 +290,7 @@ class WorkerServiceImpl final : public WorkerService::Service {
 
   Status BuildPaths(
       grpc::ServerContext*, const nix::proto::BuildPathsRequest* request,
-      grpc::ServerWriter<nix::proto::BuildEvent>* /* writer */) override {
+      grpc::ServerWriter<nix::proto::BuildEvent>* writer) override {
     return HandleExceptions(
         [&]() -> Status {
           PathSet drvs;
@@ -303,11 +303,14 @@ class WorkerServiceImpl final : public WorkerService::Service {
             return Status(grpc::StatusCode::INTERNAL, "Invalid build mode");
           }
 
+          BuildLogStreambuf log_buffer(writer);
+          std::ostream log_sink(&log_buffer);
+
           // TODO(grfn): If mode is repair and not trusted, we need to return an
           // error here (but we can't yet because we don't know anything about
           // trusted users)
           return nix::util::proto::AbslToGRPCStatus(
-              store_->buildPaths(drvs, mode.value()));
+              store_->buildPaths(log_sink, drvs, mode.value()));
         },
         __FUNCTION__);
   }