1
0

default.nix 824 B

123456789101112131415161718192021222324252627282930313233343536
  1. { fetchFromGitHub, fetchpatch, buildNeovimPlugin }:
  2. let
  3. plugins = builtins.fromJSON (builtins.readFile ./sources.json);
  4. overrides = {
  5. "nvim-telescope/telescope-fzf-native.nvim" = {
  6. dontBuild = false;
  7. };
  8. "jose-elias-alvarez/typescript.nvim" = {
  9. patches = [ ./typescript-nvim-tsserver.patch ];
  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 {
  21. inherit owner repo;
  22. inherit (spec) rev sha256;
  23. };
  24. passthru = {
  25. optional = spec.optional or false;
  26. };
  27. dontBuild = true;
  28. } // (overrides.${name} or {}));
  29. in
  30. builtins.mapAttrs buildPlugin plugins