-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Is your feature request related to a problem? Please describe.
Built-in fetchers block the evaluator. It's not possible to instantiate a derivation until the hash of the fetched source is computed.
Instead of fetching a source (inputSrc) we could represent built-in fetchers using a derivation, similar to builder = "builtins:fetchurl";.
This has the advantage that fetching the input can be
- delayed
- parallelized
- not be done at all, when dependents are substitutable
Describe the solution you'd like
Represent built-in fetching using derivations.
Fetch these outputs using built-in implementations that are not sandboxed, but trusted by virtue of being in Nix (as we do with fetchTree etc)
When scheduling the derivations, request for the Nix client to perform addToStore instead of scheduling an actual derivation build.
Describe alternatives you've considered
A representation of builtin fetchers that doesn't piggyback on derivations. We'd be reinventing the wheel, and interleaving with drv scheduling would be hard.
Additional context
- fetchTree cleanup #9061
nivis more efficient thanflake = falseflakeinputs- Can integrate with Lazy trees #6530 but non-atomic fetching might be harder than in the current situation
- source filter function needs to keep eval alive (as it currently also does, but it doesn't block)
- or just fetch it all when filtering needs to happen (as it currently is with FODs)
- or just let users use ca-derivations to do the filtering
Priorities
Add 👍 to issues you find important.