Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! This is a PR in response to #1122.
I have specified some additional
inputs.follows
rules to de-duplicate shared dependencies.devenv is still pulling three copies of nixpkgs into the lockfile. One is the actual input, the other two are used for regression tests by
nix
andpre-commit-hooks
respectively. They should never be instantiated and downloaded, so I have chosen to leave them in, but you could also make the argument that they 'pollute' the lockfile and should be overriden as well. I'd be happy to change that.Unfortunately, I was unable to resolve what I consider to be the biggest problem: devenv pulling in another copy of itself. Right now, devenv 1.0 includes a reference to the main branch of cachix, which includes a reference to the
python-rewrite
branch of devenv. Since that branch does not itself contain a reference to cachix, the chain stops there. But if you ever were to update the version of devenv used by cachix, you'd increase the length of the chain by one. If you then updated the version of cachix referenced by devenv, you'd end up withThis chain would be evergrowing.
It probably is possible to hack around this issue by removing the direct input references on one another and using flake-compat to construct mutually recursive flakes, but I'm not sure that should be the way forward.
I initially intended to resolve this by adding
cachix.inputs.devenv.follows = "self"
, but Nix does not appear to accept this.From any given Flake that includes devenv (or cachix) it is possible to resolve this by specifying both inputs and adding the necessary overrides, but that also means specifying all overrides that are included here. I would not consider that 'user-friendly'.