123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- { 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
|