From a61ea6415b9f49b976198f5206d2c48851e38d61 Mon Sep 17 00:00:00 2001 From: Sora ichigo Date: Wed, 19 Aug 2026 09:33:23 +0900 Subject: [PATCH] hunk: 0.18.0 -> 0.19.0 https://github.com/modem-dev/hunk/releases/tag/v0.19.0 0.19.0 bundles a second skill (hunk-extensions) and resolves bundled skill paths from a local `skillRelativePath` variable instead of the `HUNK_REVIEW_SKILL_RELATIVE_PATH` constant, so the postPatch replacement no longer matched and the automatic update failed: https://nixpkgs-update-logs.nix-community.org/hunk/2026-08-18.log Follow the new code, install both bundled skills, and check that the added one resolves as well. Assisted-by: Claude Code (claude-opus-5) --- pkgs/by-name/hu/hunk/package.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/hu/hunk/package.nix b/pkgs/by-name/hu/hunk/package.nix index 51ce4609c060..2f80eea4dd1e 100644 --- a/pkgs/by-name/hu/hunk/package.nix +++ b/pkgs/by-name/hu/hunk/package.nix @@ -10,13 +10,13 @@ let pname = "hunk"; - version = "0.18.0"; + version = "0.19.0"; src = fetchFromGitHub { owner = "modem-dev"; repo = "hunk"; tag = "v${version}"; - hash = "sha256-IkARkW5haVmc+iZPYe22sUi5Ak+egImdrEugtr2O5A4="; + hash = "sha256-PWblqDS86PaSl5ToFawCNGTxmrWcmoBAfq8R5lMDbyk="; }; node_modules = stdenv.mkDerivation { @@ -56,7 +56,7 @@ let dontFixup = true; - outputHash = "sha256-ueZNCab0yDRgvftao1Wgy8yrcxh1mdnQl6zR237q8WI="; + outputHash = "sha256-Ixsv2wXb39kSRck9ZbjJjRlzn4KS2fkfl3v4MEeD7cE="; outputHashMode = "recursive"; }; in @@ -76,9 +76,9 @@ stdenv.mkDerivation { postPatch = '' substituteInPlace src/core/paths.ts \ --replace-fail \ - 'join("node_modules", "hunkdiff", HUNK_REVIEW_SKILL_RELATIVE_PATH),' \ - 'join("node_modules", "hunkdiff", HUNK_REVIEW_SKILL_RELATIVE_PATH), - join("share", "skills", "hunk", "hunk-review", "SKILL.md"),' + 'join("node_modules", "hunkdiff", skillRelativePath),' \ + 'join("node_modules", "hunkdiff", skillRelativePath), + join("share", "skills", "hunk", name, "SKILL.md"),' ''; configurePhase = '' @@ -110,8 +110,8 @@ stdenv.mkDerivation { runHook preInstall install -Dm755 hunk $out/bin/hunk - mkdir -p $out/share/skills/hunk/hunk-review - cp skills/hunk-review/SKILL.md $out/share/skills/hunk/hunk-review/SKILL.md + mkdir -p $out/share/skills/hunk + cp -R skills/hunk-review skills/hunk-extensions $out/share/skills/hunk/ runHook postInstall ''; @@ -131,6 +131,7 @@ stdenv.mkDerivation { $out/bin/hunk --version | grep -F ${version} test -f "$($out/bin/hunk skill path)" + test -f "$($out/bin/hunk skill path hunk-extensions)" runHook postInstallCheck '';