This function converts from a nix_compat::derivation::Derivation to a BuildRequest. In addition to the Derivation itself, it needs two lookup functions to map input paths to their castore nodes. Change-Id: I0332982f0bc7933a5fda137fe39d5a850639d929 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10236 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
16 lines
571 B
Rust
16 lines
571 B
Rust
pub mod builtins;
|
|
pub mod known_paths;
|
|
pub mod refscan;
|
|
pub mod tvix_build;
|
|
pub mod tvix_io;
|
|
pub mod tvix_store_io;
|
|
|
|
/// 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(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()));
|
|
}
|