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/cli/src/tvix_store_io.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tvix/cli/src') diff --git a/tvix/cli/src/tvix_store_io.rs b/tvix/cli/src/tvix_store_io.rs index a774b1619e34..3ecae98cf3e2 100644 --- a/tvix/cli/src/tvix_store_io.rs +++ b/tvix/cli/src/tvix_store_io.rs @@ -344,8 +344,10 @@ async fn import_path_with_pathinfo( signatures: vec![], reference_names: vec![], deriver: None, - // TODO: narinfo for talosctl.src contains `CA: fixed:r:sha256:1x13j5hy75221bf6kz7cpgld9vgic6bqx07w5xjs4pxnksj6lxb6` - // do we need this anywhere? + ca: Some(tvix_store::proto::nar_info::Ca { + r#type: tvix_store::proto::nar_info::ca::Hash::NarSha256.into(), + digest: nar_sha256.to_vec().into(), + }), }), }; -- cgit 1.4.1