default.nix 695 B

12345678910111213141516171819202122232425262728293031
  1. { fetchFromGitHub, buildNeovimPlugin }:
  2. let
  3. plugins = builtins.fromJSON (builtins.readFile ./sources.json);
  4. overrides = {
  5. "tpope/vim-fugitive" = {
  6. patches = [ ./fugitive-origin-head.patch ];
  7. };
  8. "nvim-telescope/telescope-fzf-native.nvim" = {
  9. dontBuild = false;
  10. };
  11. };
  12. buildPlugin = name: spec:
  13. let
  14. nameParts = builtins.split "/" name;
  15. owner = builtins.head nameParts;
  16. repo = builtins.elemAt nameParts 2;
  17. in
  18. buildNeovimPlugin ({
  19. name = repo;
  20. src = fetchFromGitHub (spec // {
  21. inherit owner repo;
  22. });
  23. dontBuild = true;
  24. } // (overrides.${name} or {}));
  25. in
  26. builtins.mapAttrs buildPlugin plugins