generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python3.pkgs.tree-sitter-languages: use prebuilt grammars
- Loading branch information
Showing
2 changed files
with
37 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
pkgs/python3/pkgs/tree-sitter-languages/use-prebuilt-grammars.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/tree_sitter_languages/core.pyx b/tree_sitter_languages/core.pyx | ||
index a27377c..f01480b 100644 | ||
--- a/tree_sitter_languages/core.pyx | ||
+++ b/tree_sitter_languages/core.pyx | ||
@@ -5,12 +5,7 @@ from tree_sitter import Language, Parser | ||
|
||
|
||
def get_language(language): | ||
- if sys.platform == 'win32': | ||
- filename = 'languages.dll' | ||
- else: | ||
- filename = 'languages.so' | ||
- | ||
- binary_path = str(pathlib.Path(__file__).parent / filename) | ||
+ binary_path = str(pathlib.Path(__file__).parent / "languages" / language) | ||
language = Language(binary_path, language) | ||
return language | ||
|