about summary refs log tree commit diff
path: root/tvix/eval/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/lib.rs')
-rw-r--r--tvix/eval/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tvix/eval/src/lib.rs b/tvix/eval/src/lib.rs
index 98440975646b..a8e3d70f2e30 100644
--- a/tvix/eval/src/lib.rs
+++ b/tvix/eval/src/lib.rs
@@ -219,6 +219,11 @@ impl<'code, 'co, 'ro> Evaluation<'code, 'co, 'ro> {
         let mut noop_observer = observer::NoOpObserver::default();
         let compiler_observer = self.compiler_observer.take().unwrap_or(&mut noop_observer);
 
+        // Insert a storeDir builtin *iff* a store directory is present.
+        if let Some(store_dir) = self.io_handle.store_dir() {
+            self.builtins.push(("storeDir", store_dir.into()));
+        }
+
         let (lambda, globals) = match parse_compile_internal(
             &mut result,
             self.code,