Skip to content

Commit fc17036

Browse files
authored
nix: drop tree-sitter grammars from devshell (#15603)
Previously running `nix develop` (or any other way of entering the devshell) could take a long time due to downloading all of the tree-sitter grammars despite them not being used in the shell. This drops the grammars from the devshell by overriding the grammar filter function to exclude all of them. This way other inputs are still automatically derived from the main helix packages, but grammars are excluded only when building for the devshell. The main package and checks still builds with grammars included.
1 parent f7909f1 commit fc17036

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

flake.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@
6363
platformRustFlagsEnv = lib.optionalString pkgs.stdenv.isLinux "-Clink-arg=-Wl,--no-rosegment";
6464
in
6565
pkgs.mkShell {
66-
inputsFrom = [self.checks.${system}.helix];
66+
inputsFrom = [
67+
(self.checks.${system}.helix.override {
68+
includeGrammarIf = _: false;
69+
})
70+
];
6771
nativeBuildInputs = with pkgs;
6872
[
6973
lld

0 commit comments

Comments
 (0)