Skip to content

build(nix): take lefthook from nixpkgs-unstable - #4

Merged
furedea merged 1 commit into
mainfrom
build/lefthook-from-unstable
Oct 18, 2026
Merged

furedea merged 1 commit into
mainfrom
build/lefthook-from-unstable

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

What

  • Add a nixpkgs-unstable flake input and take only lefthook from it in the devShell. Every other package stays on the existing nixpkgs (25.11-darwin).
  • flake.lock only gains the new nixpkgs-unstable entry; the existing nixpkgs lock is unchanged.

Why

The devShell's lefthook came from nixpkgs 25.11 (1.13.6). lefthook before 2.1.6 runs hook commands under a pty, which agent sandboxes deny, so commits made inside nix develop failed in their hooks. This mirrors the fix already used in furedea/dotfiles.

Verification

  • nix develop -c lefthook version → 2.1.15
  • nix flake check passes
  • nix develop -c lefthook run pre-commit --all-files: deadnix, ls-lint, nixfmt, statix, fmt, jxa-lint, jxa-format, typecheck pass. clippy failed only because the sandbox denies writes to ~/.cargo/registry; with CARGO_HOME/CARGO_TARGET_DIR pointed at a temp dir, cargo clippy -- -D warnings passes.
  • The commit was made with nix develop -c git commit with lefthook enabled inside the sandbox: pre-commit (deadnix, ls-lint, nixfmt, statix) and commit-msg (commitlint) hooks ran under lefthook v2.1.15 and passed.

Refs furedea/dotfiles#207

🤖 Generated with Claude Code

lefthook before 2.1.6 runs hook commands under a pty, which agent
sandboxes deny, so commits made inside the devShell failed in their
hooks. Take only lefthook from a new nixpkgs-unstable input and keep
every other package on the existing nixpkgs.

Refs furedea/dotfiles#207

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@furedea
furedea merged commit 2d16bbd into main Oct 18, 2026
14 checks passed
@furedea
furedea deleted the build/lefthook-from-unstable branch October 18, 2026 08:36
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