on master help sign in
flake: use builtins.fetchTree to shallow-clone grammar repos
e01c535Michael Davis
flake.lock+15−34
@@ -25,11 +25,11 @@
25 ]
25 ]
26 },
26 },
27 "locked": {
27 "locked": {
28− "lastModified": 1646322147,
28+ "lastModified": 1646667754,
29− "narHash": "sha256-XwrdjThHPq/APV7B6mXJwYvN/3RmsjX1W4zPgjvCp0A=",
29+ "narHash": "sha256-LahZHvCC3UVzGQ55iWDRZkuDssXl1rYgqgScrPV9S38=",
30 "owner": "numtide",
30 "owner": "numtide",
31 "repo": "devshell",
31 "repo": "devshell",
32− "rev": "2cc45675b223a35ca1d8af6383752c3d4b66f484",
32+ "rev": "59fbe1dfc0de8c3332957c16998a7d16dff365d8",
33 "type": "github"
33 "type": "github"
34 },
34 },
35 "original": {
35 "original": {
@@ -75,11 +75,11 @@
75 ]
75 ]
76 },
76 },
77 "locked": {
77 "locked": {
78− "lastModified": 1646647374,
78+ "lastModified": 1646710334,
79− "narHash": "sha256-sFGoE9LbHfP5t8NGcNkX4sPVq9kp8+ae8ODnW5eOkzo=",
79+ "narHash": "sha256-eLBcDgcbOUfeH4k6SEW5a5v0PTp2KNCn+5ZXIoWGYww=",
80 "owner": "nix-community",
80 "owner": "nix-community",
81 "repo": "dream2nix",
81 "repo": "dream2nix",
82− "rev": "76412363073ea1252700eb48901849cf8480e138",
82+ "rev": "5dcfbfd3b60ce0208b894c1bdea00e2bdf80ca6a",
83 "type": "github"
83 "type": "github"
84 },
84 },
85 "original": {
85 "original": {
@@ -119,24 +119,6 @@
119 "type": "github"
119 "type": "github"
120 }
120 }
121 },
121 },
122− "helix": {
123− "flake": false,
124− "locked": {
125− "lastModified": 1646500939,
126− "narHash": "sha256-M0QvrRuluDkBWUfd5CYwvj9WtgalKlm5stJUAwnhrwI=",
127− "ref": "master",
128− "rev": "7633c5acd30258fc9caca926bfaa264d07d508ec",
129− "revCount": 2438,
130− "submodules": true,
131− "type": "git",
132− "url": "https://github.com/helix-editor/helix.git"
133− },
134− "original": {
135− "submodules": true,
136− "type": "git",
137− "url": "https://github.com/helix-editor/helix.git"
138− }
139− },
140 "nixCargoIntegration": {
122 "nixCargoIntegration": {
141 "inputs": {
123 "inputs": {
142 "devshell": "devshell",
124 "devshell": "devshell",
@@ -149,11 +131,11 @@
149 ]
131 ]
150 },
132 },
151 "locked": {
133 "locked": {
152− "lastModified": 1646681124,
134+ "lastModified": 1646766572,
153− "narHash": "sha256-1ytR1z6RyBbxhk0LiO18QBH6Mu1JfAEWuUVBdbD4Bw8=",
135+ "narHash": "sha256-DV3+zxvAIKsMHsHedJKYFsracvFyLKpFQqurUBR86oY=",
154 "owner": "yusdacra",
136 "owner": "yusdacra",
155 "repo": "nix-cargo-integration",
137 "repo": "nix-cargo-integration",
156− "rev": "3b08d21177cecd5d69bdf76400a6145a021d1e49",
138+ "rev": "3a3f47f43ba486b7554164a698c8dfc5a38624ce",
157 "type": "github"
139 "type": "github"
158 },
140 },
159 "original": {
141 "original": {
@@ -164,11 +146,11 @@
164 },
146 },
165 "nixpkgs": {
147 "nixpkgs": {
166 "locked": {
148 "locked": {
167− "lastModified": 1646254136,
149+ "lastModified": 1646497237,
168− "narHash": "sha256-8nQx02tTzgYO21BP/dy5BCRopE8OwE8Drsw98j+Qoaw=",
150+ "narHash": "sha256-Ccpot1h/rV8MgcngDp5OrdmLTMaUTbStZTR5/sI7zW0=",
169 "owner": "nixos",
151 "owner": "nixos",
170 "repo": "nixpkgs",
152 "repo": "nixpkgs",
171− "rev": "3e072546ea98db00c2364b81491b893673267827",
153+ "rev": "062a0c5437b68f950b081bbfc8a699d57a4ee026",
172 "type": "github"
154 "type": "github"
173 },
155 },
174 "original": {
156 "original": {
@@ -180,7 +162,6 @@
180 },
162 },
181 "root": {
163 "root": {
182 "inputs": {
164 "inputs": {
183− "helix": "helix",
184 "nixCargoIntegration": "nixCargoIntegration",
165 "nixCargoIntegration": "nixCargoIntegration",
185 "nixpkgs": "nixpkgs",
166 "nixpkgs": "nixpkgs",
186 "rust-overlay": "rust-overlay"
167 "rust-overlay": "rust-overlay"
@@ -194,11 +175,11 @@
194 ]
175 ]
195 },
176 },
196 "locked": {
177 "locked": {
197− "lastModified": 1642128126,
178+ "lastModified": 1646792695,
198− "narHash": "sha256-av8JUACdrTfQYl/ftZJvKpZEmZfa0avCq7tt5Usdoq0=",
179+ "narHash": "sha256-2drCXIKIQnJMlTZbcCfuHZAh+iPcdlRkCqtZnA6MHLY=",
199 "owner": "oxalica",
180 "owner": "oxalica",
200 "repo": "rust-overlay",
181 "repo": "rust-overlay",
201− "rev": "ce4ef6f2d74f2b68f7547df1de22d1b0037ce4ad",
182+ "rev": "7f599870402c8d2a5806086c8ee0f2d92b175c54",
202 "type": "github"
183 "type": "github"
203 },
184 },
204 "original": {
185 "original": {
flake.nix+1−9
@@ -12,17 +12,9 @@
12 inputs.nixpkgs.follows = "nixpkgs";
12 inputs.nixpkgs.follows = "nixpkgs";
13 inputs.rustOverlay.follows = "rust-overlay";
13 inputs.rustOverlay.follows = "rust-overlay";
14 };
14 };
15− # NOTE: the flake looks like it is hanging when it pulls this input because
16− # the submodules take a long time to clone. This will be fixed in #1659.
17− helix = {
18− url = "https://github.com/helix-editor/helix.git";
19− type = "git";
20− submodules = true;
21− flake = false;
22− };
23 };
15 };
24
16
25− outputs = inputs@{ nixCargoIntegration, helix, ... }:
17+ outputs = inputs@{ nixCargoIntegration, ... }:
26 nixCargoIntegration.lib.makeOutputs {
18 nixCargoIntegration.lib.makeOutputs {
27 root = ./.;
19 root = ./.;
28 renameOutputs = { "helix-term" = "helix"; };
20 renameOutputs = { "helix-term" = "helix"; };
grammars.nix+4−2
@@ -13,10 +13,12 @@ let
13 gitGrammars = builtins.filter isGitGrammar languagesConfig.grammar;
13 gitGrammars = builtins.filter isGitGrammar languagesConfig.grammar;
14 buildGrammar = grammar:
14 buildGrammar = grammar:
15 let
15 let
16− source = builtins.fetchGit {
16+ source = builtins.fetchTree {
17+ type = "git";
17 url = grammar.source.git;
18 url = grammar.source.git;
18 rev = grammar.source.rev;
19 rev = grammar.source.rev;
19− allRefs = true;
20+ ref = grammar.source.ref or "HEAD";
21+ shallow = true;
20 };
22 };
21 in stdenv.mkDerivation rec {
23 in stdenv.mkDerivation rec {
22 # see https://github.com/NixOS/nixpkgs/blob/fbdd1a7c0bc29af5325e0d7dd70e804a972eb465/pkgs/development/tools/parsing/tree-sitter/grammar.nix
24 # see https://github.com/NixOS/nixpkgs/blob/fbdd1a7c0bc29af5325e0d7dd70e804a972eb465/pkgs/development/tools/parsing/tree-sitter/grammar.nix
languages.toml+2−2
@@ -73,7 +73,7 @@ indent = { tab-width = 2, unit = " " }
73
73
74[[grammar]]
74[[grammar]]
75name = "protobuf"
75name = "protobuf"
76−source = { git = "https://github.com/yusdacra/tree-sitter-protobuf", rev = "19c211a01434d9f03efff99f85e19f967591b175" }
76+source = { git = "https://github.com/yusdacra/tree-sitter-protobuf", rev = "19c211a01434d9f03efff99f85e19f967591b175"}
77
77
78[[language]]
78[[language]]
79name = "elixir"
79name = "elixir"
@@ -88,7 +88,7 @@ indent = { tab-width = 2, unit = " " }
88
88
89[[grammar]]
89[[grammar]]
90name = "elixir"
90name = "elixir"
91−source = { git = "https://github.com/elixir-lang/tree-sitter-elixir", rev = "f5d7bda543da788bd507b05bd722627dde66c9ec" }
91+source = { git = "https://github.com/elixir-lang/tree-sitter-elixir", rev = "f5d7bda543da788bd507b05bd722627dde66c9ec" }
92
92
93[[language]]
93[[language]]
94name = "fish"
94name = "fish"