diff options
Diffstat (limited to 'tvix/glue/src/lib.rs')
-rw-r--r-- | tvix/glue/src/lib.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tvix/glue/src/lib.rs b/tvix/glue/src/lib.rs index a5dbdb8742fc..f6f99f3c32a3 100644 --- a/tvix/glue/src/lib.rs +++ b/tvix/glue/src/lib.rs @@ -14,12 +14,14 @@ mod tests; /// Tell the Evaluator to resolve `<nix>` to the path `/__corepkgs__`, /// which has special handling in [tvix_io::TvixIO]. /// This is used in nixpkgs to import `fetchurl.nix` from `<nix>`. -pub fn configure_nix_path<IO>( - eval: &mut tvix_eval::Evaluation<IO>, +pub fn configure_nix_path<'co, 'ro, 'env, IO>( + eval_builder: tvix_eval::EvaluationBuilder<'co, 'ro, 'env, IO>, nix_search_path: &Option<String>, -) { - eval.nix_path = nix_search_path - .as_ref() - .map(|p| format!("nix=/__corepkgs__:{}", p)) - .or_else(|| Some("nix=/__corepkgs__".to_string())); +) -> tvix_eval::EvaluationBuilder<'co, 'ro, 'env, IO> { + eval_builder.nix_path( + nix_search_path + .as_ref() + .map(|p| format!("nix=/__corepkgs__:{}", p)) + .or_else(|| Some("nix=/__corepkgs__".to_string())), + ) } |