Skip to content

fix(nix): install hunkdiff alias so hunk patch works - #1108

Merged
benvinegar merged 1 commit into
modem-dev:mainfrom
schickling-assistant:fix/nix-hunkdiff-alias
Sep 23, 2026
Merged

benvinegar merged 1 commit into
modem-dev:mainfrom
schickling-assistant:fix/nix-hunkdiff-alias

Conversation

@schickling-assistant

Copy link
Copy Markdown
Contributor

Problem and user impact

Since 0.22.0, hunk patch <file> (and other review flows that respawn the TUI) fail under the Nix flake package with:

error: unable to execute '…/bin/hunkdiff': No such file or directory

hunk --version / --help / skill path still work. v0.21.1 works with the identical install layout. Reported as #1106.

Approach

The review flows resolve the TUI through a hunkdiff lookup, mirroring the npm package's dual hunk/hunkdiff bins (same ./bin/hunk.cjs). The Nix installPhase only installed hunk, so the lookup fails. This change installs hunkdiff as a symlink to the wrapped hunk binary (wrapper env, including HUNK_INSTALL_SOURCE=nix, is preserved through the symlink).

Non-goals: no behavior change to any other install path (npm, curl, Homebrew); no new package output.

Tests and manual checks performed

  • nix build .#hunk --no-link on x86_64-linux: builds clean.
  • hunk patch /tmp/smoke.patch from the fixed package with a clean PATH (package bin only): renders the review TUI, exit 0. Before the fix: the unable to execute …/bin/hunkdiff error.
  • hunk --version and hunkdiff --version both report the packaged version.
  • Bun unit test suite not run: the change touches only nix/package.nix (no TypeScript), and the failure/success is fully determined by the installed file layout, verified above.

Platforms

  • Tested: x86_64-linux (Nix).
  • Not tested: aarch64-linux, x86_64-darwin, aarch64-darwin (same derivation shape; relies on CI).

Follow-up

Once merged, downstream Nix consumers can advance past the v0.21.1 hold.

Posted on behalf of @schickling
field value
agent_identity dev3.direct.omp.udckw4nk
session unknown
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.1.14
agent_runtime OMP 18.1.14
agent_model openai-codex/gpt-5.6-sol
worktree 2026-09-12-tmux/2026-09-15-external-flakes
tooling_profile dotfiles@183d780

The 0.22 review flows respawn the TUI through a hunkdiff lookup,
mirroring the npm package's dual hunk/hunkdiff bins. The Nix package
installed only hunk, so hunk patch failed with
"unable to execute '.../bin/hunkdiff'".

Install hunkdiff as a symlink to the wrapped hunk binary.

agent-identity: dev3.direct.omp.udckw4nk
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.1.14
agent-runtime: OMP 18.1.14
agent-model: openai-codex/gpt-5.6-sol
tooling-profile: dotfiles@183d780
@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

@schickling-assistant is attempting to deploy a commit to the Modem Team on Vercel.

A member of the Team first needs to authorize it.

@benvinegar

Copy link
Copy Markdown
Member

Thanks!

@benvinegar
benvinegar merged commit b72696a into modem-dev:main Sep 23, 2026
13 of 14 checks passed
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.

2 participants