about summary refs log tree commit diff
path: root/tvix/glue/src/builtins/derivation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/glue/src/builtins/derivation.rs')
-rw-r--r--tvix/glue/src/builtins/derivation.rs21
1 files changed, 12 insertions, 9 deletions
diff --git a/tvix/glue/src/builtins/derivation.rs b/tvix/glue/src/builtins/derivation.rs
index 8400dcea13fe..473aa9d5e315 100644
--- a/tvix/glue/src/builtins/derivation.rs
+++ b/tvix/glue/src/builtins/derivation.rs
@@ -554,7 +554,9 @@ pub(crate) mod derivation_builtins {
             .to_contextful_str()
             .context("evaluating the `content` parameter of builtins.toFile")?;
 
-        if content.iter_derivation().count() > 0 || content.iter_single_outputs().count() > 0 {
+        if content.iter_ctx_derivation().count() > 0
+            || content.iter_ctx_single_outputs().count() > 0
+        {
             return Err(ErrorKind::UnexpectedContext);
         }
 
@@ -568,13 +570,14 @@ pub(crate) mod derivation_builtins {
             let blob_digest = blob_writer.close().await?;
             let ca_hash = CAHash::Text(Sha256::digest(&content).into());
 
-            let store_path = build_ca_path(name.to_str()?, &ca_hash, content.iter_plain(), false)
-                .map_err(|_e| {
-                    nix_compat::derivation::DerivationError::InvalidOutputName(
-                        name.to_str_lossy().into_owned(),
-                    )
-                })
-                .map_err(DerivationError::InvalidDerivation)?;
+            let store_path =
+                build_ca_path(name.to_str()?, &ca_hash, content.iter_ctx_plain(), false)
+                    .map_err(|_e| {
+                        nix_compat::derivation::DerivationError::InvalidOutputName(
+                            name.to_str_lossy().into_owned(),
+                        )
+                    })
+                    .map_err(DerivationError::InvalidDerivation)?;
 
             let root_node = Node::File(FileNode {
                 name: store_path.to_string().into(),
@@ -592,7 +595,7 @@ pub(crate) mod derivation_builtins {
 
             // assemble references from plain context.
             let reference_paths: Vec<StorePathRef> = content
-                .iter_plain()
+                .iter_ctx_plain()
                 .map(|elem| StorePathRef::from_absolute_path(elem.as_bytes()))
                 .collect::<Result<_, _>>()
                 .map_err(|e| ErrorKind::TvixError(Rc::new(e)))?;