-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flakes: builtin function to flatten inputs using follows #4753
Comments
Reason: #3075 Basically having any function on the flake attributes is impossible right now, by design. |
I've also run into this problem a bunch and it is quite annoying to manually need to specify everywhere. I quite like the solution @gytis-ivaskevicius has proposed. |
@DieracDelta, to implement it in the way that edolstra would be happy with - this would need to be done which is probably somewhat complex #3966 (comment), so yeah.. Don't put too much hope in this solution |
I think, given the current implementation of flakes, it may be easier to implement this on the cli level. So maybe something like |
I marked this as stale due to inactivity. → More info |
Is your feature request related to a problem? Please describe.
Having to specify
inputs.foo.inputs.bar.follows
everywhere can become tedious. Sometimes it is needed because packages need to be upgraded in lockstep.Describe the solution you'd like
A builtin function that, given a set of inputs, would set the follows of each input to the other inputs. Essentially, this function would flatten the inputs tree as shown by
nix flake metadata
as much as possible. Users can choose to apply the function on the entire set of inputs, or on one or more subsets.Describe alternatives you've considered
While it is possible to implement the function in Nix directly, it is not possible to share such function (would require copying) or actually even use it, because Nix doesn't allow it.
Maybe a function likes this needs to take parameters to exclude certain inputs from being followed. I don't have this use case but I can imagine it.
Additional context
This may also be desirable as the whole dependency tree of a flake grows, and there will be many "copies" of Nixpkgs and/or other flakes.
The text was updated successfully, but these errors were encountered: