Commit
+68 -0 +/-2 browse
1 | diff --git a/flake.lock b/flake.lock |
2 | new file mode 100644 |
3 | index 0000000..9a3d833 |
4 | --- /dev/null |
5 | +++ b/flake.lock |
6 | @@ -0,0 +1,41 @@ |
7 | + { |
8 | + "nodes": { |
9 | + "flake-utils": { |
10 | + "locked": { |
11 | + "lastModified": 1638122382, |
12 | + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", |
13 | + "owner": "numtide", |
14 | + "repo": "flake-utils", |
15 | + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", |
16 | + "type": "github" |
17 | + }, |
18 | + "original": { |
19 | + "owner": "numtide", |
20 | + "repo": "flake-utils", |
21 | + "type": "github" |
22 | + } |
23 | + }, |
24 | + "nixpkgs": { |
25 | + "locked": { |
26 | + "lastModified": 1638385739, |
27 | + "narHash": "sha256-mga0C4YuAbv2OuSXpVWyweWwXNsdHWVWsG5SdTf9EY4=", |
28 | + "owner": "NixOS", |
29 | + "repo": "nixpkgs", |
30 | + "rev": "d4577bc68d87bb1a8703b87870065b73018837f5", |
31 | + "type": "github" |
32 | + }, |
33 | + "original": { |
34 | + "id": "nixpkgs", |
35 | + "type": "indirect" |
36 | + } |
37 | + }, |
38 | + "root": { |
39 | + "inputs": { |
40 | + "flake-utils": "flake-utils", |
41 | + "nixpkgs": "nixpkgs" |
42 | + } |
43 | + } |
44 | + }, |
45 | + "root": "root", |
46 | + "version": 7 |
47 | + } |
48 | diff --git a/flake.nix b/flake.nix |
49 | new file mode 100644 |
50 | index 0000000..4230e0d |
51 | --- /dev/null |
52 | +++ b/flake.nix |
53 | @@ -0,0 +1,27 @@ |
54 | + { |
55 | + inputs.flake-utils.url = "github:numtide/flake-utils"; |
56 | + |
57 | + outputs = { self, nixpkgs, flake-utils }: |
58 | + flake-utils.lib.eachDefaultSystem |
59 | + (system: |
60 | + let |
61 | + pkgs = nixpkgs.legacyPackages.${system}; |
62 | + in |
63 | + { |
64 | + devShell = pkgs.mkShell { |
65 | + buildInputs = with pkgs; [ |
66 | + # I have a custom fork I'm using but others may want 'tree-sitter' |
67 | + # or you can use 'npx tree-sitter <command>' |
68 | + # tree-sitter |
69 | + # |
70 | + # needed to build the grammar with 'tree-sitter generate' |
71 | + nodejs |
72 | + # compiles parser.c and other relavent c code in the grammar |
73 | + clang |
74 | + # for formatting grammar.js |
75 | + nodePackages.prettier |
76 | + ]; |
77 | + }; |
78 | + } |
79 | + ); |
80 | + } |