Unnamed repository; edit this file 'description' to name the repository.
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.
| -rw-r--r-- | flake.nix | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -63,7 +63,11 @@ platformRustFlagsEnv = lib.optionalString pkgs.stdenv.isLinux "-Clink-arg=-Wl,--no-rosegment"; in pkgs.mkShell { - inputsFrom = [self.checks.${system}.helix]; + inputsFrom = [ + (self.checks.${system}.helix.override { + includeGrammarIf = _: false; + }) + ]; nativeBuildInputs = with pkgs; [ lld |