2023-11-03 16:40:32 +02:00
|
|
|
pub mod builtins;
|
2023-11-03 13:34:37 +02:00
|
|
|
pub mod known_paths;
|
|
|
|
pub mod refscan;
|
2023-12-09 12:53:17 +02:00
|
|
|
pub mod tvix_build;
|
2023-11-03 13:34:37 +02:00
|
|
|
pub mod tvix_io;
|
|
|
|
pub mod tvix_store_io;
|
|
|
|
|
2024-01-14 01:41:16 +01:00
|
|
|
#[cfg(test)]
|
|
|
|
mod tests;
|
|
|
|
|
2023-12-21 17:25:22 +02:00
|
|
|
/// Tell the Evaluator to resolve `<nix>` to the path `/__corepkgs__`,
|
2023-11-03 14:03:19 +02:00
|
|
|
/// which has special handling in [tvix_io::TvixIO].
|
|
|
|
/// This is used in nixpkgs to import `fetchurl.nix` from `<nix>`.
|
|
|
|
pub fn configure_nix_path(eval: &mut tvix_eval::Evaluation, 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()));
|
|
|
|
}
|