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.cc13
1 files changed, 13 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 ed859f584e39..79ff9cadc2d1 100644
--- a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
+++ b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
@@ -336,6 +336,19 @@ class WorkerServiceImpl final : public WorkerService::Service {
         __FUNCTION__);
   }
 
+  Status EnsurePath(grpc::ServerContext* context,
+                    const nix::proto::StorePath* request,
+                    google::protobuf::Empty*) override {
+    auto path = request->path();
+    ASSERT_INPUT_STORE_PATH(path);
+    return HandleExceptions(
+        [&]() -> Status {
+          store_->ensurePath(path);
+          return Status::OK;
+        },
+        __FUNCTION__);
+  }
+
   Status AddTempRoot(grpc::ServerContext*, const nix::proto::StorePath* request,
                      google::protobuf::Empty*) override {
     auto path = request->path();