serpl: add ast-grep feature (#383414)
This commit is contained in:
@@ -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 { };
|
||||
|
||||
Reference in New Issue
Block a user