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.rs24
1 files changed, 10 insertions, 14 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(