Support overriding inputs
Using flakes, we can override inputs of our inputs, such as setting the follows property for nixpkgs inside another input, etc. This should be possible with flake-compat as well. Relevant PR: https://github.com/NixOS/flake-compat/pull/49
Some prior art is https://github.com/NixOS/nix/pull/11952, but if flake-compat finds a more general way, e.g. allowing arbitrary flake by value, I think that'd be preferable.
@roberth would you be able to do elaborate on what you mean by "allowing arbitrary flake by value"? Thanks!
A "flake" can be refer to potentially many things
- a source tree
- a source tree and a closure of flake inputs
- an entry in
inputs - the result of calling
flake.nix/outputsand adding those few extra attrs on top of that, notably_type = "flake";, perhaps alsoinputs - a set of unadulterated attributes pertaining to such a flake call, where the
outputsresult is morely one of them, andoutPathcan be accessed without callingoutputs(this only exists internally if at all and is not specified)
Input overrides are normally thought of as 1, 2 or 3 at a certain input attribute path, but we have the freedom in flake-compat (and potentially getFlake) to also support 4 or perhaps in the future also 5.
So I was referring to 4, but we may need 5 to make it bug-free.