diff options
Diffstat (limited to 'tvix/glue/src/builtins')
-rw-r--r-- | tvix/glue/src/builtins/derivation.rs | 24 | ||||
-rw-r--r-- | tvix/glue/src/builtins/import.rs | 4 |
2 files changed, 12 insertions, 16 deletions
diff --git a/tvix/glue/src/builtins/derivation.rs b/tvix/glue/src/builtins/derivation.rs index b597d20211e9..71249f1c7722 100644 --- a/tvix/glue/src/builtins/derivation.rs +++ b/tvix/glue/src/builtins/derivation.rs @@ -485,28 +485,24 @@ pub(crate) mod derivation_builtins { .map(|(name, output)| { ( name.clone(), - ( - output.path.unwrap().to_absolute_path(), - Some( - NixContextElement::Single { - name, - derivation: drv_path.to_absolute_path(), - } - .into(), - ), - ) + NixString::new_context_from( + NixContextElement::Single { + name, + derivation: drv_path.to_absolute_path(), + } .into(), + output.path.unwrap().to_absolute_path(), + ), ) }) .collect(); new_attrs.push(( "drvPath".to_string(), - ( + NixString::new_context_from( + NixContextElement::Derivation(drv_path.to_absolute_path()).into(), drv_path.to_absolute_path(), - Some(NixContextElement::Derivation(drv_path.to_absolute_path()).into()), - ) - .into(), + ), )); Ok(Value::Attrs(Box::new(NixAttrs::from_iter( diff --git a/tvix/glue/src/builtins/import.rs b/tvix/glue/src/builtins/import.rs index 7e21942e9196..08f8a40636ae 100644 --- a/tvix/glue/src/builtins/import.rs +++ b/tvix/glue/src/builtins/import.rs @@ -63,8 +63,8 @@ async fn filtered_ingest( &co, filter.clone(), [ - Value::String(Box::new(entry.path().as_os_str().as_encoded_bytes().into())), - Value::String(Box::new(file_type.into())), + Value::String(entry.path().as_os_str().as_encoded_bytes().into()), + Value::String(file_type.into()), ], ) .await, |