From 431a5782b2373ffce258728bfbfa656d4d93efcb Mon Sep 17 00:00:00 2001 From: r-vdp Date: Thu, 16 Apr 2026 10:39:35 +0200 Subject: [PATCH] vimPlugins.nvim-treesitter: build per-language queries locally buildQueries produces ~300 trivial mkdir+symlink derivations (one per language) under passthru.queries / withAllGrammars. They're not on cache.nixos.org since release.nix doesn't recurse into passthru.queries and the only Hydra job that builds them (passthru.tests.check-queries) doesn't keep them in its runtime closure. With remote builders configured, each one round-trips over the network for a build that's faster than the SSH handshake. Use runCommandLocal so they build on the local machine and skip the guaranteed-miss cache queries. --- .../editors/vim/plugins/nvim-treesitter/overrides.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix b/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix index f0f56a9b8213..092fbfb5a5b3 100644 --- a/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix @@ -7,6 +7,7 @@ neovim, neovimUtils, runCommand, + runCommandLocal, vimPlugins, writableTmpDirAsHomeHook, }: @@ -22,7 +23,11 @@ let requires ? [ ], }: vimUtils.toVimPlugin ( - runCommand "nvim-treesitter-queries-${language}" + # Just mkdir + ln -s; cheaper to build than to substitute (and not + # on cache.nixos.org anyway since release.nix doesn't recurse into + # passthru.queries). With ~300 languages under withAllGrammars, + # round-tripping each to a remote builder is very slow. + runCommandLocal "nvim-treesitter-queries-${language}" { passthru = { inherit language requires;