serpl: add ast-grep feature (#383414)

This commit is contained in:
Sandro
2025-02-19 21:30:44 +01:00
committed by GitHub
+9 -1
View File
@@ -4,6 +4,7 @@
fetchFromGitHub,
gitUpdater,
makeWrapper,
ast-grep,
ripgrep,
}:
let
@@ -19,6 +20,8 @@ rustPlatform.buildRustPackage {
hash = "sha256-koD5aFqL+XVxc5Iq3reTYIHiPm0z7hAQ4K59IfbY4Hg=";
};
buildFeatures = [ "ast_grep" ];
nativeBuildInputs = [ makeWrapper ];
useFetchCargoVendor = true;
@@ -27,7 +30,12 @@ rustPlatform.buildRustPackage {
postFixup = ''
# Serpl needs ripgrep to function properly.
wrapProgram $out/bin/serpl \
--prefix PATH : "${lib.strings.makeBinPath [ ripgrep ]}"
--prefix PATH : "${
lib.strings.makeBinPath [
ripgrep
ast-grep
]
}"
'';
passthru.updateScript = gitUpdater { };