about summary refs log tree commit diff
path: root/third_party/nix
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix')
-rw-r--r--third_party/nix/src/nix-daemon/nix-daemon-proto.cc17
1 files changed, 17 insertions, 0 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 857d49b4b157..7344811eeac4 100644
--- a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
+++ b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
@@ -167,6 +167,23 @@ class WorkerServiceImpl final : public WorkerService::Service {
     return Status::OK;
   }
 
+  Status QuerySubstitutablePaths(grpc::ServerContext* context,
+                                 const StorePaths* request,
+                                 StorePaths* response) override {
+    std::set<Path> paths;
+    for (const auto& path : request->paths()) {
+      paths.insert(path);
+    }
+
+    auto res = store_->querySubstitutablePaths(paths);
+
+    for (const auto& path : res) {
+      response->add_paths(path);
+    }
+
+    return Status::OK;
+  }
+
   Status QueryMissing(grpc::ServerContext* context, const StorePaths* request,
                       nix::proto::QueryMissingResponse* response) override {
     std::set<Path> targets;