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/tests/fixtures.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tvix/store/src/tests') diff --git a/tvix/store/src/tests/fixtures.rs b/tvix/store/src/tests/fixtures.rs index 95e77e3ba7b2..3f37d4a2a573 100644 --- a/tvix/store/src/tests/fixtures.rs +++ b/tvix/store/src/tests/fixtures.rs @@ -2,7 +2,7 @@ use lazy_static::lazy_static; pub use tvix_castore::fixtures::*; use tvix_castore::proto as castorepb; -use crate::proto::{NarInfo, PathInfo}; +use crate::proto::{nar_info::ca, nar_info::Ca, NarInfo, PathInfo}; pub const DUMMY_NAME: &str = "00000000000000000000000000000000-dummy"; @@ -121,6 +121,7 @@ lazy_static! { signatures: vec![], reference_names: vec![DUMMY_NAME.to_string()], deriver: None, + ca: Some(Ca { r#type: ca::Hash::NarSha256.into(), digest: DUMMY_DIGEST.clone().into() }) }), ..PATH_INFO_WITHOUT_NARINFO.clone() }; -- cgit 1.4.1