From 863a77dd2a4be271724404d412d41c6361355ce8 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Wed, 15 Jul 2020 22:01:27 -0400 Subject: feat(3p/nix): Add QueryPathFromHashPart Change-Id: I0a31557f4cf585d3e539e29ef1a07b443aeec9fc Reviewed-on: https://cl.tvl.fyi/c/depot/+/1202 Tested-by: BuildkiteCI Reviewed-by: tazjin --- third_party/nix/src/proto/worker.proto | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'third_party/nix/src') diff --git a/third_party/nix/src/proto/worker.proto b/third_party/nix/src/proto/worker.proto index acb19cc8dea7..9ba5ac852a4b 100644 --- a/third_party/nix/src/proto/worker.proto +++ b/third_party/nix/src/proto/worker.proto @@ -65,6 +65,9 @@ service Worker { // Query the output names of the given derivation rpc QueryDerivationOutputNames(StorePath) returns (DerivationOutputNames); + + // TODO: What is a HashPart? + rpc QueryPathFromHashPart(HashPart) returns (StorePath); } enum HashType { @@ -203,19 +206,23 @@ message SubstitutablePathInfos { } message QueryPathInfoResponse { - StorePath deriver = 1; - string nar_hash = 2; - repeated string references = 3; - google.protobuf.Timestamp registration_time = 4; - uint64 nar_size = 5; - // Whether the path is ultimately trusted, that is, it's a derivation - // output that was built locally. - bool ultimate = 6; - repeated string sigs = 7; - // If non-empty, an assertion that the path is content-addressed - string ca = 8; + StorePath deriver = 1; + string nar_hash = 2; + repeated string references = 3; + google.protobuf.Timestamp registration_time = 4; + uint64 nar_size = 5; + // Whether the path is ultimately trusted, that is, it's a derivation + // output that was built locally. + bool ultimate = 6; + repeated string sigs = 7; + // If non-empty, an assertion that the path is content-addressed + string ca = 8; }; message DerivationOutputNames { - repeated string names = 1; + repeated string names = 1; +} + +message HashPart { + string hash_part = 1; } -- cgit 1.4.1