{ fetchFromGitHub, fetchpatch, buildNeovimPlugin }: let plugins = builtins.fromJSON (builtins.readFile ./sources.json); overrides = { "tpope/vim-fugitive" = { patches = [ ./fugitive-origin-head.patch ]; }; "leafgarland/typescript-vim" = { patches = [ # make compiler build entire project ./typescript-vim-compiler.patch # prevent unsetting omnifunc (fetchpatch { url = "https://github.com/leafgarland/typescript-vim/pull/202.patch"; sha256 = "sha256-xHgOdoA8qBesCgNk9J8dINSgSyXj4ymmfcJEm+qWs54"; }) ]; }; "nvim-telescope/telescope-fzf-native.nvim" = { dontBuild = false; }; }; buildPlugin = name: spec: let nameParts = builtins.split "/" name; owner = builtins.head nameParts; repo = builtins.elemAt nameParts 2; in buildNeovimPlugin ({ name = repo; src = fetchFromGitHub (spec // { inherit owner repo; }); dontBuild = true; } // (overrides.${name} or {})); in builtins.mapAttrs buildPlugin plugins