diff --git a/pkgs/development/python-modules/tree-sitter/default.nix b/pkgs/development/python-modules/tree-sitter/default.nix index 300366a8a4d0..15cf8b8bea00 100644 --- a/pkgs/development/python-modules/tree-sitter/default.nix +++ b/pkgs/development/python-modules/tree-sitter/default.nix @@ -1,18 +1,10 @@ { lib, - stdenv, buildPythonPackage, fetchPypi, # build-system setuptools, - - # tests - tree-sitter-python, - tree-sitter-rust, - tree-sitter-html, - tree-sitter-javascript, - tree-sitter-json, }: buildPythonPackage rec { @@ -25,33 +17,10 @@ buildPythonPackage rec { hash = "sha256-zXYa0OTR/IiksbgIO64G1PlzrPb18pu/E+qWCcHeycE="; }; - # see https://github.com/tree-sitter/py-tree-sitter/issues/330#issuecomment-2629403946 - patches = lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [ - ./segfault-patch.diff - ]; - build-system = [ setuptools ]; - nativeCheckInputs = [ - tree-sitter-python - tree-sitter-rust - tree-sitter-html - tree-sitter-javascript - tree-sitter-json - ]; - pythonImportsCheck = [ "tree_sitter" ]; - preCheck = '' - # https://github.com/NixOS/nixpkgs/issues/255262#issuecomment-1721265871 - rm -r tree_sitter - ''; - - disabledTests = [ - # test fails in nix sandbox - "test_dot_graphs" - ]; - meta = { description = "Python bindings to the Tree-sitter parsing library"; homepage = "https://github.com/tree-sitter/py-tree-sitter"; diff --git a/pkgs/development/python-modules/tree-sitter/segfault-patch.diff b/pkgs/development/python-modules/tree-sitter/segfault-patch.diff deleted file mode 100644 index 9d325ac532c0..000000000000 --- a/pkgs/development/python-modules/tree-sitter/segfault-patch.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- i/tree_sitter/core/lib/src/parser.c -+++ w/tree_sitter/core/lib/src/parser.c -@@ -2084,6 +2084,10 @@ void ts_parser_reset(TSParser *self) { - self->parse_state = (TSParseState) {0}; - } - -+// FIXME: see tree-sitter/py-tree-sitter#330 -+#if __GNUC__ >= 14 && defined(__aarch64__) && defined(__OPTIMIZE__) && !defined(__OPTIMIZE_SIZE__) -+__attribute__((optimize(2))) -+#endif - TSTree *ts_parser_parse( - TSParser *self, - const TSTree *old_tree,