Skip to content

Add duplicate-inputs check and dedup flake inputs - #1902

Merged
etrobert merged 3 commits into
mainfrom
claude/wonderful-lamport-fmpmj3
Dec 2, 2026
Merged

etrobert merged 3 commits into
mainfrom
claude/wonderful-lamport-fmpmj3

Conversation

@etrobert

@etrobert etrobert commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Adds checks.duplicate-inputs: for each direct dependency's input that shares a name with one of ours but is locked separately, it fails and prints the follows line that dedups it — name matching, as nix-auto-follow (https://github.com/fzakaria/nix-auto-follow) and flake-edit (https://github.com/a-kenji/flake-edit) do.

On main's lock it fails with:

Some dependencies lock their own copy of an input this flake already has,
so it gets fetched twice. Make them reuse ours by adding to the inputs in flake.nix:

  neovim-nightly.inputs.flake-parts.follows = "flake-parts";
  neovim-nightly.inputs.nixpkgs.follows = "nixpkgs";
  tsnsrv.inputs.flake-parts.follows = "flake-parts";

Those follows are added in the first commit. Four lock nodes go; every existing pin is unchanged.

No host changes: the tower, leod and pi toplevels differ from main only in nixos-version and deploy-gate, which embed the git revision (checked with nix-diff). neovim-nightly's overlay is flake-parts' easyOverlay, which re-evaluates perSystem with the nixpkgs it is applied to, so neovim already built against ours.

Trade-offs: a copy shared by two dependencies we don't pin ourselves goes unseen, and a dependency whose nixpkgs must deliberately differ from ours has no exemption yet.

🤖 Generated with Claude Code

@etrobert etrobert changed the title Add check flagging inputs locked more than once Add duplicate-inputs check and dedup flake inputs Dec 2, 2026
@etrobert
etrobert force-pushed the claude/wonderful-lamport-fmpmj3 branch from 971098e to d479ddd Compare December 2, 2026 11:50
etrobert and others added 3 commits December 2, 2026 12:55
Each kept its own nixpkgs or flake-parts: a second fetch on every update.
Every pin we already had is unchanged; four lock nodes go.

neovim-nightly's overlay comes from flake-parts' easyOverlay, which
re-evaluates perSystem with the nixpkgs it is applied to, so neovim
already built against ours.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
For each direct dependency's input sharing a name with one of ours but
locked separately, fail and print the follows line that dedups it. Name
matching, as nix-auto-follow and flake-edit do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@etrobert
etrobert force-pushed the claude/wonderful-lamport-fmpmj3 branch from e899de6 to 40dd944 Compare December 2, 2026 11:55
@etrobert
etrobert marked this pull request as ready for review December 2, 2026 12:03
@etrobert
etrobert merged commit 27c445d into main Dec 2, 2026
12 checks passed
@etrobert
etrobert deleted the claude/wonderful-lamport-fmpmj3 branch December 2, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant