Open roberth opened 2 weeks ago
I would say it's in the scope of this project. What is the API you're envisioning?
This could be a new function besides __functor
that takes an extra argument representing overrides, similar to what you'd get with --override-input
on flakes that are loaded into the Nix CLI. The syntax for this new argument could be reminiscent of flake.nix
inputs
, and it could contain either sources or already evaluated flakes (ie like a getFlake
return value, where outputs
has been called, etc).
We have all the info we need in order to override inputs.
I don't know if implementing that would be an ambition of this project, diverging more from flake-compat, but it is feasible to do so.
One possible use case for this, is to split development dependencies in a separate lock file, but when loading those inputs, always override Nixpkgs to be the main Nixpkgs from the main lock file. Ultimately that is a workaround for https://github.com/NixOS/nix/issues/7730 which aims to make inputs lazier so that we don't have to care about splitting those, but that issue will take time to implement.