summaryrefslogtreecommitdiff
path: root/default.nix
blob: be725bdeba997b8579f6789179912b3f567944b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
  lib,
  buildVimPluginFrom2Nix,
  self,
  version,
}: let
  filter = path: type: let
    path' = toString path;
    base = baseNameOf path';
    isLua = lib.any (suffix: lib.hasSuffix suffix base) [".lua"];
  in
    type == "directory" || isLua;

  filterSource = src:
    lib.cleanSourceWith {
      src = lib.cleanSource self;
      inherit filter;
    };
in
  buildVimPluginFrom2Nix {
    pname = "getchvim";
    inherit version;
    src = filterSource self;
    meta = with lib; {
      homepage = "https://github.com/getchoo/getchvim";
      license = licenses.mit;
      maintainers = with maintainers; [getchoo];
      platforms = platforms.all;
    };
  }