From 501b5b8fe3d5f5ec39fbace761ea9c8ddce43f68 Mon Sep 17 00:00:00 2001 From: Zexin Yuan Date: Tue, 20 May 2025 15:21:51 +0800 Subject: [PATCH] python3Packages.tree-sitter-language-pack: 0.6.1 -> 0.7.3 --- .../tree-sitter-language-pack/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tree-sitter-language-pack/default.nix b/pkgs/development/python-modules/tree-sitter-language-pack/default.nix index c63bd83f8df0..d1e099c82654 100644 --- a/pkgs/development/python-modules/tree-sitter-language-pack/default.nix +++ b/pkgs/development/python-modules/tree-sitter-language-pack/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "tree-sitter-language-pack"; - version = "0.6.1"; + version = "0.7.3"; pyproject = true; # Using the GitHub sources necessitates fetching the treesitter grammar parsers by using a vendored script: @@ -26,7 +26,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "tree_sitter_language_pack"; inherit version; - hash = "sha256-pGNfW2ubZCVi2QHk6qJfyClJ1mDIi5R1Pm1GfZY0Ark="; + hash = "sha256-SROctgfYE1LTOtGOV1IPwQV6AJlVyczO1WYHzBjmo/0="; }; build-system = [ @@ -42,6 +42,12 @@ buildPythonPackage rec { tree-sitter-yaml ]; + prePatch = '' + # Remove the packaged bindings, which only work on Linux and prevent the build from succeeding + # https://github.com/Goldziher/tree-sitter-language-pack/issues/46 + rm -rf tree_sitter_language_pack/bindings/*.so + ''; + pythonImportsCheck = [ "tree_sitter_language_pack" "tree_sitter_language_pack.bindings"