depot/third_party/nixpkgs/pkgs/development/tools/misc/ast-grep/default.nix
Default email c7f94ff3ce Project import generated by Copybara.
GitOrigin-RevId: b85ed9dcbf187b909ef7964774f8847d554fab3b
2023-08-22 22:05:09 +02:00

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 ];
};
}