c7f94ff3ce
GitOrigin-RevId: b85ed9dcbf187b909ef7964774f8847d554fab3b
38 lines
936 B
Nix
38 lines
936 B
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, stdenv
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "ast-grep";
|
|
version = "0.11.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ast-grep";
|
|
repo = "ast-grep";
|
|
rev = version;
|
|
hash = "sha256-chx37D0y05nIlXmP4SsWvsO+36BV7drTYpJCgMIl5xA=";
|
|
};
|
|
|
|
cargoHash = "sha256-VfuBee2F2FxhcTE1JwosFgQI9+stzDuOHfpLv25rcNw=";
|
|
|
|
# error: linker `aarch64-linux-gnu-gcc` not found
|
|
postPatch = ''
|
|
rm .cargo/config.toml
|
|
'';
|
|
|
|
checkFlags = [
|
|
# disable flaky test
|
|
"--skip=test::test_load_parser_mac"
|
|
];
|
|
|
|
meta = with lib; {
|
|
mainProgram = "sg";
|
|
description = "A 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";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ montchr lord-valen cafkafk ];
|
|
};
|
|
}
|