From 833957b3749d4d31ccb7aeb96a8fb25ebb931e67 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 19 Oct 2023 13:50:05 +0100 Subject: feat(tvix/store/protos): add CA field This adds support to represent the `CA` field found in some .narinfo files. As `deriver`, it's also a subfield of the `narinfo` field. Extending nix-compat with a more accessible data structure that can take care of formatting, as well as writing validation functions in Rust + Golang, and integrating it into nar-bridge is something for a followup CL. Change-Id: I71e9c30957bcd03051a491aa54d7baac25b6dd2d Reviewed-on: https://cl.tvl.fyi/c/depot/+/9795 Autosubmit: flokli Tested-by: BuildkiteCI Reviewed-by: Connor Brewster --- tvix/store/src/bin/tvix-store.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tvix/store/src/bin') diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs index 891b10da6955..3f7d984cd014 100644 --- a/tvix/store/src/bin/tvix-store.rs +++ b/tvix/store/src/bin/tvix-store.rs @@ -21,6 +21,7 @@ use tvix_castore::proto::GRPCBlobServiceWrapper; use tvix_castore::proto::GRPCDirectoryServiceWrapper; use tvix_castore::proto::NamedNode; use tvix_store::pathinfoservice; +use tvix_store::proto::nar_info; use tvix_store::proto::path_info_service_server::PathInfoServiceServer; use tvix_store::proto::GRPCPathInfoServiceWrapper; use tvix_store::proto::NarInfo; @@ -303,6 +304,10 @@ async fn main() -> Result<(), Box> { signatures: vec![], reference_names: vec![], deriver: None, + ca: Some(nar_info::Ca { + r#type: tvix_store::proto::nar_info::ca::Hash::NarSha256.into(), + digest: nar_sha256.to_vec().into(), + }), }), }; -- cgit 1.4.1