{ fetchFromGitHub, fetchpatch, buildNeovimPlugin }: let plugins = builtins.fromJSON (builtins.readFile ./sources.json); overrides = { "nvim-telescope/telescope-fzf-native.nvim" = { dontBuild = false; }; "nvim-treesitter/nvim-treesitter" = { patches = [ # these extra rules causes nvim to crash when looking at a deeply nested # JSX expression ./treesitter-jsx.patch # try to fix indentation in JS ./treesitter-ecma.patch ]; }; "mistweaverco/kulala.nvim" = { patches = [ ./kulala-treesitter.patch ]; }; "FourierTransformer/tinytoml" = { postPatch = '' mkdir lua mv tinytoml.lua lua ''; }; }; buildPlugin = name: spec: let nameParts = builtins.split "/" name; owner = builtins.head nameParts; repo = builtins.elemAt nameParts 2; in buildNeovimPlugin ({ name = repo; src = fetchFromGitHub { inherit owner repo; inherit (spec) rev sha256; }; passthru = { optional = spec.optional or false; }; dontBuild = true; } // (overrides.${name} or {})); in builtins.mapAttrs buildPlugin plugins