Skip to main content

FlakeResolverFn

Type Alias FlakeResolverFn 

Source
pub type FlakeResolverFn = dyn Fn(&str) -> Result<StringKeyedValue, String>;
Expand description

Signature for an external flake resolver.

When set, the VM delegates builtins.getFlake to this callback instead of using its own limited input resolution. The callback receives the raw flake reference string (e.g. "path:/foo/bar") and returns a StringKeyedValue attrset representing the fully resolved flake outputs.

sui-eval sets this to the tree-walker’s evaluate_flake which handles all input types (GitHub, path, indirect) and produces correct results for (getFlake ref).inputs.nixpkgs.