diff options
Diffstat (limited to 'tvix/glue/src/builtins')
-rw-r--r-- | tvix/glue/src/builtins/derivation.rs | 10 | ||||
-rw-r--r-- | tvix/glue/src/builtins/import.rs | 11 |
2 files changed, 6 insertions, 15 deletions
diff --git a/tvix/glue/src/builtins/derivation.rs b/tvix/glue/src/builtins/derivation.rs index 27ae2e1d6925..a79545437a67 100644 --- a/tvix/glue/src/builtins/derivation.rs +++ b/tvix/glue/src/builtins/derivation.rs @@ -577,10 +577,7 @@ pub(crate) mod derivation_builtins { }) .map_err(DerivationError::InvalidDerivation)?; - let root_node = Node::File( - FileNode::new(store_path.to_string().into(), blob_digest, blob_size, false) - .map_err(|e| ErrorKind::TvixError(Rc::new(e)))?, - ); + let root_node = Node::File(FileNode::new(blob_digest, blob_size, false)); // calculate the nar hash let (nar_size, nar_sha256) = state @@ -600,7 +597,10 @@ pub(crate) mod derivation_builtins { state .path_info_service .put(PathInfo { - node: Some((&root_node).into()), + node: Some(tvix_castore::proto::Node::from_name_and_node( + store_path.to_string().into(), + root_node, + )), references: reference_paths .iter() .map(|x| bytes::Bytes::copy_from_slice(x.digest())) diff --git a/tvix/glue/src/builtins/import.rs b/tvix/glue/src/builtins/import.rs index 1cf4145427b8..a09dc5a06b35 100644 --- a/tvix/glue/src/builtins/import.rs +++ b/tvix/glue/src/builtins/import.rs @@ -213,16 +213,7 @@ mod import_builtins { .tokio_handle .block_on(async { blob_writer.close().await })?; - let root_node = Node::File( - FileNode::new( - // The name gets set further down, while constructing the PathInfo. - "".into(), - blob_digest, - blob_size, - false, - ) - .map_err(|e| tvix_eval::ErrorKind::TvixError(Rc::new(e)))?, - ); + let root_node = Node::File(FileNode::new(blob_digest, blob_size, false)); let ca_hash = if recursive_ingestion { let (_nar_size, nar_sha256) = state |