diff --git a/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix b/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix index 8e3b39e6c177..137d364e5472 100644 --- a/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix @@ -4,9 +4,17 @@ self: super: let inherit (neovimUtils) grammarToPlugin; - generatedGrammars = callPackage ./generated.nix { + + initialGeneratedGrammars = callPackage ./generated.nix { inherit (tree-sitter) buildGrammar; }; + grammarOverrides = final: prev: { + nix = prev.nix.overrideAttrs { + # workaround for https://github.com/NixOS/nixpkgs/issues/332580 + prePatch = "rm queries/highlights.scm"; + }; + }; + generatedGrammars = lib.fix (lib.extends grammarOverrides (_: initialGeneratedGrammars)); generatedDerivations = lib.filterAttrs (_: lib.isDerivation) generatedGrammars;