File tree Expand file tree Collapse file tree 2 files changed +61
-0
lines changed
development/python-modules/tree-sitter-sql Expand file tree Collapse file tree 2 files changed +61
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ buildPythonPackage ,
4+ fetchFromGitHub ,
5+
6+ # build-system
7+ setuptools ,
8+ tree-sitter-sql ,
9+
10+ #optional-dependencies
11+ tree-sitter ,
12+ } :
13+ buildPythonPackage rec {
14+ pname = "tree-sitter-sql" ;
15+ version = "0.3.8" ;
16+ pyproject = true ;
17+
18+ src = fetchFromGitHub {
19+ owner = "DerekStride" ;
20+ repo = "tree-sitter-sql" ;
21+ tag = "v${ version } " ;
22+ hash = "sha256-8gdbbz187sV8I+PJHubFyyQwGUqvo05Yw1DX7rOK4DI=" ;
23+ } ;
24+
25+ postUnpack = ''
26+ cp -rf ${ tree-sitter-sql . passthru . parsers } /* $sourceRoot
27+ '' ;
28+
29+ build-system = [
30+ setuptools
31+ ] ;
32+
33+ passthru = {
34+ # As mentioned in https://github.com/DerekStride/tree-sitter-sql README
35+ # generated tree sitter parser files necessary for compilation
36+ # are separately distributed on the gh-pages branch
37+ parsers = fetchFromGitHub {
38+ owner = "DerekStride" ;
39+ repo = "tree-sitter-sql" ;
40+ rev = "9853b887c5e4309de273922b681cc7bc09e30c78/gh-pages" ;
41+ hash = "sha256-p60nphbSN+O5fOlL06nw0qgQFpmvoNCTmLzDvUC/JGs=" ;
42+ } ;
43+ } ;
44+
45+ optional-dependencies = {
46+ core = [
47+ tree-sitter
48+ ] ;
49+ } ;
50+
51+ pythonImportsCheck = [ "tree_sitter_sql" ] ;
52+
53+ meta = {
54+ description = "sql grammar for tree-sitter" ;
55+ homepage = "https://github.com/DerekStride/tree-sitter-sql" ;
56+ license = lib . licenses . mit ;
57+ maintainers = with lib . maintainers ; [ pcboy ] ;
58+ } ;
59+ }
Original file line number Diff line number Diff line change @@ -17911,6 +17911,8 @@ self: super: with self; {
1791117911
1791217912 tree-sitter-rust = callPackage ../development/python-modules/tree-sitter-rust { };
1791317913
17914+ tree-sitter-sql = callPackage ../development/python-modules/tree-sitter-sql { };
17915+
1791417916 tree-sitter-yaml = callPackage ../development/python-modules/tree-sitter-yaml { };
1791517917
1791617918 treelib = callPackage ../development/python-modules/treelib { };
You can’t perform that action at this time.
0 commit comments