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.
junglerobba 3 months ago
parent f7909f1 · commit fc17036
-rw-r--r--flake.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index 5672e62f..f935c527 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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