about summary refs log tree commit diff
path: root/tvix/store/protos/pathinfo.proto
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-10-10T21·06+0200
committerflokli <flokli@flokli.de>2023-10-14T13·23+0000
commit5f8eb4eeaaad31aedc45efee3143e6b0bbc982a4 (patch)
tree24633312e41753a3cf2686da98d927bb7e1e0042 /tvix/store/protos/pathinfo.proto
parent173641ed37318fe61886ccb0402a9929b0f5783d (diff)
feat(tvix/store/protos): add StorePath message r/6804
This encodes a store path a bit more concise, which is used in the
Deriver field.

Change-Id: Ibfb54d3b206917e51970d1d5fe94fcedb901704b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9646
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/store/protos/pathinfo.proto')
-rw-r--r--tvix/store/protos/pathinfo.proto11
1 files changed, 11 insertions, 0 deletions
diff --git a/tvix/store/protos/pathinfo.proto b/tvix/store/protos/pathinfo.proto
index aa98c6df9a2d..080e3f6b49a2 100644
--- a/tvix/store/protos/pathinfo.proto
+++ b/tvix/store/protos/pathinfo.proto
@@ -23,6 +23,17 @@ message PathInfo {
     NARInfo narinfo = 3;
 }
 
+// Represents a path in the Nix store (a direct child of STORE_DIR).
+// It is commonly formatted by a nixbase32-encoding the digest, and
+// concatenating the name, separated by a `-`.
+message StorePath {
+    // The string after digest and `-`.
+    string name = 1;
+
+    // The digest (20 bytes).
+    bytes digest = 2;
+}
+
 // Nix C++ uses NAR (Nix Archive) as a format to transfer store paths,
 // and stores metadata and signatures in NARInfo files.
 // Store all these attributes in a separate message.