diff options
author | Vincent Ambo <mail@tazj.in> | 2020-07-16T21·55+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-07-16T22·10+0000 |
commit | afe99225b96cda7f1151d3455fde97e5e76a7fe7 (patch) | |
tree | 50f0156d8b87f52ba23dae46873c6737e15228f4 /third_party/nix/src/proto | |
parent | cf6c48ef4734a699bf6674013635a9ff57232dbe (diff) |
feat(3p/nix/proto): Add AddToStoreNar RPC call r/1335
Change-Id: I335630644205adb280d83e006baf9d497ac1ac95 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1221 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to '')
-rw-r--r-- | third_party/nix/src/proto/worker.proto | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/third_party/nix/src/proto/worker.proto b/third_party/nix/src/proto/worker.proto index bfcc86b0bb54..f192478cf1ff 100644 --- a/third_party/nix/src/proto/worker.proto +++ b/third_party/nix/src/proto/worker.proto @@ -61,7 +61,7 @@ service Worker { rpc QueryAllValidPaths(google.protobuf.Empty) returns (StorePaths); // TODO: What does this do? - rpc QueryPathInfo(StorePath) returns (QueryPathInfoResponse); + rpc QueryPathInfo(StorePath) returns (PathInfo); // Query the output names of the given derivation rpc QueryDerivationOutputNames(StorePath) returns (DerivationOutputNames); @@ -96,6 +96,10 @@ service Worker { // TODO: What does this do? rpc NarFromPath(StorePath) returns (StorePath); + + // Upload & add a NAR to the daemon's Nix store. + rpc AddToStoreNar(stream AddToStoreNarRequest) + returns (google.protobuf.Empty); } enum HashType { @@ -241,19 +245,7 @@ message CollectGarbageResponse { uint64 bytes_freed = 2; } -message SubstitutablePathInfos { - message PathInfo { - string path = 1; - string deriver = 2; - uint64 download_size = 3; - uint64 nar_size = 4; - repeated string references = 5; - } - - repeated PathInfo path_infos = 1; -} - -message QueryPathInfoResponse { +message PathInfo { StorePath deriver = 1; string nar_hash = 2; repeated string references = 3; @@ -265,7 +257,11 @@ message QueryPathInfoResponse { repeated string sigs = 7; // If non-empty, an assertion that the path is content-addressed string ca = 8; -}; +} + +message SubstitutablePathInfos { + repeated PathInfo path_infos = 1; +} message DerivationOutputNames { repeated string names = 1; @@ -296,3 +292,10 @@ message BuildDerivationResponse { BuildStatus status = 1; string errorMessage = 2; } + +message AddToStoreNarRequest { + oneof add_oneoff { + PathInfo path_info = 1; + bytes chunk = 2; + } +} |