mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-18 05:39:58 +00:00
hunk: move skills to $out/share/skills/hunk (#551371)
This commit is contained in:
@@ -71,6 +71,16 @@ stdenv.mkDerivation {
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
# Teach `hunk skill path` to find the FHS layout under share/skills/$pname
|
||||
# (https://github.com/NixOS/nixpkgs/issues/547426) instead of $out/skills.
|
||||
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"),'
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
@@ -100,9 +110,8 @@ stdenv.mkDerivation {
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 hunk $out/bin/hunk
|
||||
mkdir -p $out/share/hunk
|
||||
cp -R skills $out/share/hunk/skills
|
||||
ln -s share/hunk/skills $out/skills
|
||||
mkdir -p $out/share/skills/hunk/hunk-review
|
||||
cp skills/hunk-review/SKILL.md $out/share/skills/hunk/hunk-review/SKILL.md
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user