Skip to content

flake: fix infinite recursion in packages - #65

Merged
bdelanghe merged 1 commit into
mainfrom
fix-flake-recursion
Oct 27, 2026
Merged

bdelanghe merged 1 commit into
mainfrom
fix-flake-recursion

Conversation

@bdelanghe

@bdelanghe bdelanghe commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Closes #67

nix build of brand fails on main with "infinite recursion": the packages set is rec { default = brand pkgs; brand = default; }. Renaming the builder breaks the cycle; the full build passes with this change.

  1. Independent PR — no bundled or speculative changes
    • Verified: flake.nix packages only
  2. Changed codepaths verified — targeted unit and full integration tests
    • Verified: nix build of the package succeeds (failed with infinite recursion before)
  3. Root cause identified — every failure traced to source
    • default and brand defined in terms of each other inside rec
  4. No duplication — refactoring preferred over copy/paste
    • N/A
  5. No unrelated changes — housekeeping isolated to its own branch
    • N/A (the microcopy change is a separate PR)

🤖 Generated with Claude Code

https://claude.ai/code/session_0117AAnztxdG2tNqQSCsQB7q

…e rec)

Inside `rec { default = brand pkgs; brand = default; }` the name `brand`
resolves to the attribute itself, not the outer builder, so every
`nix build` and `nix flake check` failed with "infinite recursion
encountered". Rename the builder to mkBrand; the package attributes keep
their names.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117AAnztxdG2tNqQSCsQB7q
@bdelanghe
bdelanghe merged commit 1ee9eb7 into main Oct 27, 2026
9 of 12 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Front Desk Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

nix build fails: infinite recursion in packages (default = brand pkgs inside rec)

1 participant