diff --git a/pkgs/development/python-modules/grep-ast/default.nix b/pkgs/development/python-modules/grep-ast/default.nix new file mode 100644 index 000000000000..01d164bacdc1 --- /dev/null +++ b/pkgs/development/python-modules/grep-ast/default.nix @@ -0,0 +1,41 @@ +{ + buildPythonPackage, + fetchPypi, + lib, + + pathspec, + pytestCheckHook, + setuptools, + tree-sitter-languages, +}: + +buildPythonPackage rec { + pname = "grep-ast"; + version = "0.3.3"; + pyproject = true; + + src = fetchPypi { + inherit version; + pname = "grep_ast"; + hash = "sha256-QriIfVcwHcVWNDaPjVSenEnJE9r7TRnJtUw922BPzPQ="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + pathspec + tree-sitter-languages + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "grep_ast" ]; + + meta = { + homepage = "https://github.com/paul-gauthier/grep-ast"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ greg ]; + description = "Python implementation of the ast-grep tool"; + mainProgram = "grep-ast"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0fd0de0df609..5d724731d9e3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5295,6 +5295,8 @@ self: super: with self; { gremlinpython = callPackage ../development/python-modules/gremlinpython { }; + grep-ast = callPackage ../development/python-modules/grep-ast { }; + greynoise = callPackage ../development/python-modules/greynoise { }; growattserver = callPackage ../development/python-modules/growattserver { };