Skip to main content

fetch_lazy

Function fetch_lazy 

Source
fn fetch_lazy(
    state: Rc<SnixStoreIO>,
    name: String,
    fetch: Fetch,
) -> Result<Value, ErrorKind>
Expand description

Consumes a fetch. If there is enough info to calculate the store path without fetching, queue the fetch to be fetched lazily, and return the store path. If there’s not enough info to calculate it, do the fetch now, and then return the store path. Note the builtins.typeof of fetchurl and fetchTarball are not “path”, but “string”, to stay bug-compatible with Nix.