ast-grep: cleanup & fix on aarch64-linux (#385922)

This commit is contained in:
Nick Cao
2025-02-28 20:09:10 -05:00
committed by GitHub
+9 -4
View File
@@ -10,17 +10,22 @@
enableLegacySg ? false,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "ast-grep";
version = "0.35.0";
src = fetchFromGitHub {
owner = "ast-grep";
repo = "ast-grep";
tag = version;
tag = finalAttrs.version;
hash = "sha256-uiQYqVcSSQT32Vu8iE5ATIHFGDiyuxaQvg8hkBtB4DU=";
};
# error: linker `aarch64-linux-gnu-gcc` not found
postPatch = ''
rm .cargo/config.toml
'';
useFetchCargoVendor = true;
cargoHash = "sha256-B/egtLMBrlLobB1m04L1NlNmZ6+DdQIV9Ae0LVPmO2Y=";
@@ -60,7 +65,7 @@ rustPlatform.buildRustPackage rec {
mainProgram = "ast-grep";
description = "Fast and polyglot tool for code searching, linting, rewriting at large scale";
homepage = "https://ast-grep.github.io/";
changelog = "https://github.com/ast-grep/ast-grep/blob/${src.rev}/CHANGELOG.md";
changelog = "https://github.com/ast-grep/ast-grep/blob/${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
xiaoxiangmoe
@@ -69,4 +74,4 @@ rustPlatform.buildRustPackage rec {
cafkafk
];
};
}
})