diff options
author | Christina Sørensen <christina@cafkafk.com> | 2023-09-29 18:36:14 +0200 |
---|---|---|
committer | Christina Sørensen <christina@cafkafk.com> | 2023-09-29 18:36:14 +0200 |
commit | a6f750c23e583360716dedf31c2ecc444bfc7591 (patch) | |
tree | 060868f98211b7303add3ae2f06fdd992ed7acef /pkgs/by-name/as/ast-grep | |
parent | 9ee9d1a7ffe22264b14d6f4c864230f25440dd75 (diff) |
ast-grep: use by-name
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Diffstat (limited to 'pkgs/by-name/as/ast-grep')
-rw-r--r-- | pkgs/by-name/as/ast-grep/package.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/by-name/as/ast-grep/package.nix b/pkgs/by-name/as/ast-grep/package.nix new file mode 100644 index 0000000000000..a6c98629fe014 --- /dev/null +++ b/pkgs/by-name/as/ast-grep/package.nix @@ -0,0 +1,38 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, stdenv +}: + +rustPlatform.buildRustPackage rec { + pname = "ast-grep"; + version = "0.12.2"; + + src = fetchFromGitHub { + owner = "ast-grep"; + repo = "ast-grep"; + rev = version; + hash = "sha256-N9hfHgzqwV/G3/xNY2Vx1i2dW6BcABJ/4lkhnLuvIns="; + }; + + cargoHash = "sha256-3ntsPC6OWtSN3MH+3wN2BgOqH69jiW93/xfLY+niARI="; + + # 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 ]; + }; +} |