Is your feature request related to a problem? Please describe.
Sometimes a fixed output derivation doesn't work. For example, a site may have gone offline.
However, the same content may be available in a different location, such as a mirror, web archive, or a peer to peer content addressable store such as IPFS.
Currently, only traditional mirrors lists can be used in anticipation of such failures.
Describe the solutions you'd like
"Inductive":
Add a special field such as __alternateDerivation
Only allow it when the output(s) are fixed
Do not treat it as a dependency
If the build fails, try the __alternateDerivation instead. It must produce an output with the same name and hash.
"Algebraic":
Add a new derivation system value, such as builtin:alternatives
Disallow the builder attribute.
Require fixed outputs
Instead only allow an alternatives list, referencing derivations that implement the fixed output derivation
Comparison
It feels more natural to have metadata to be specified in the latter "algebraic" design, although nothing stops us from doing it with the inductive syntax.
Uses of metadata:
scheduling can deprioritize bad sources (e.g. domains that are down, protocols that don't work)
users can configure to disallow certain protocols, etc
Is your feature request related to a problem? Please describe.
Sometimes a fixed output derivation doesn't work. For example, a site may have gone offline. However, the same content may be available in a different location, such as a mirror, web archive, or a peer to peer content addressable store such as IPFS. Currently, only traditional mirrors lists can be used in anticipation of such failures.
Describe the solutions you'd like
"Inductive":
__alternateDerivation
__alternateDerivation
instead. It must produce an output with the samename
and hash."Algebraic":
system
value, such asbuiltin:alternatives
builder
attribute.alternatives
list, referencing derivations that implement the fixed output derivationComparison
It feels more natural to have metadata to be specified in the latter "algebraic" design, although nothing stops us from doing it with the inductive syntax. Uses of metadata:
Additional context
Priorities
Add :+1: to issues you find important.