diff options
-rw-r--r-- | third_party/nix/src/nix-daemon/nix-daemon-proto.cc | 14 | ||||
-rw-r--r-- | third_party/nix/src/proto/worker.proto | 7 |
2 files changed, 20 insertions, 1 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 26ae538f29ad..d94e34cb40cd 100644 --- a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc +++ b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc @@ -227,6 +227,20 @@ class WorkerServiceImpl final : public WorkerService::Service { return Status::OK; } + Status AddSignatures(grpc::ServerContext* context, + const nix::proto::AddSignaturesRequest* request, + google::protobuf::Empty* response) override { + auto path = request->path().path(); + store_->assertStorePath(path); + + StringSet sigs; + sigs.insert(request->sigs().sigs().begin(), request->sigs().sigs().end()); + + store_->addSignatures(path, sigs); + + return Status::OK; + } + Status QueryMissing(grpc::ServerContext* context, const StorePaths* request, nix::proto::QueryMissingResponse* response) override { std::set<Path> targets; diff --git a/third_party/nix/src/proto/worker.proto b/third_party/nix/src/proto/worker.proto index 3dd83d9988f7..d8d2cc8bbd2e 100644 --- a/third_party/nix/src/proto/worker.proto +++ b/third_party/nix/src/proto/worker.proto @@ -92,7 +92,7 @@ service WorkerService { // Add signatures to the specified store path. The signatures are not // verified. - rpc AddSignatures(Signatures) returns (google.protobuf.Empty); + rpc AddSignatures(AddSignaturesRequest) returns (google.protobuf.Empty); // TODO: What does this do? rpc NarFromPath(StorePath) returns (StorePath); @@ -314,6 +314,11 @@ message BuildDerivationResponse { string error_message = 2; } +message AddSignaturesRequest { + StorePath path = 1; + Signatures sigs = 2; +} + message AddToStoreNarRequest { oneof add_oneoff { PathInfo path_info = 1; |