about summary refs log tree commit diff
path: root/third_party/nix/src/proto/worker.proto
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-07-16T02·32-0400
committerglittershark <grfn@gws.fyi>2020-07-16T21·41+0000
commitf4baaf79e285d72375e27f9329cbd39d57f8cb4d (patch)
tree259cc4365ab1dea9b5a39a34f33533b5978e86e9 /third_party/nix/src/proto/worker.proto
parentdb4ac8ea7c22fc49877e4ec9f170af852ba986df (diff)
feat(3p/nix): Add BuildDerivation proto r/1332
Change-Id: Ib66b4ff2da72677e74b6a713186c72f66d9f6f88
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1208
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'third_party/nix/src/proto/worker.proto')
-rw-r--r--third_party/nix/src/proto/worker.proto31
1 files changed, 31 insertions, 0 deletions
diff --git a/third_party/nix/src/proto/worker.proto b/third_party/nix/src/proto/worker.proto
index d983b261c84a..b24d5e97e7eb 100644
--- a/third_party/nix/src/proto/worker.proto
+++ b/third_party/nix/src/proto/worker.proto
@@ -85,6 +85,10 @@ service Worker {
 
   // Check the integrity of the Nix store
   rpc VerifyStore(VerifyStoreRequest) returns (VerifyStoreResponse);
+
+  // Build a single non-materialized derivation (i.e. not from an
+  // on-disk .drv file).
+  rpc BuildDerivation(BuildDerivationRequest) returns (BuildDerivationResponse);
 }
 
 enum HashType {
@@ -117,6 +121,22 @@ enum GCAction {
   DeleteSpecific = 3;
 }
 
+enum BuildStatus {
+  Built = 0;
+  Substituted = 1;
+  AlreadyValid = 2;
+  PermanentFailure = 3;
+  InputRejected = 4;
+  OutputRejected = 5;
+  TransientFailure = 6;  // possibly transient
+  CachedFailure = 7;     // no longer used
+  TimedOut = 8;
+  MiscFailure = 9;
+  DependencyFailed = 10;
+  LogLimitExceeded = 11;
+  NotDeterministic = 12;
+};
+
 // Generic type for any RPC call that just reads or returns a single
 // store path.
 message StorePath {
@@ -254,3 +274,14 @@ message VerifyStoreResponse {
   // True if errors remain (???)
   bool errors = 1;
 }
+
+message BuildDerivationRequest {
+  // Only used for informational purposes.
+  StorePath drvPath = 1;
+  BuildMode buildMode = 2;
+}
+
+message BuildDerivationResponse {
+  BuildStatus status = 1;
+  string errorMessage = 2;
+}