1 | { |
2 | inputs.flake-utils.url = "github:numtide/flake-utils"; |
3 | |
4 | outputs = { self, nixpkgs, flake-utils }: |
5 | flake-utils.lib.eachDefaultSystem |
6 | (system: |
7 | let |
8 | pkgs = nixpkgs.legacyPackages.${system}; |
9 | in |
10 | { |
11 | devShell = pkgs.mkShell { |
12 | buildInputs = with pkgs; [ |
13 | # I have a custom fork I'm using but others may want 'tree-sitter' |
14 | # or you can use 'npx tree-sitter <command>' |
15 | # tree-sitter |
16 | # |
17 | # needed to build the grammar with 'tree-sitter generate' |
18 | nodejs |
19 | # compiles parser.c and other relavent c code in the grammar |
20 | clang |
21 | # for formatting grammar.js |
22 | nodePackages.prettier |
23 | ]; |
24 | }; |
25 | } |
26 | ); |
27 | } |