summary refs log tree commit diff
path: root/pkgs/youcompleteme.nix
blob: 190e4b5d9cd3547041ea769df59bd42374c3b872 (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
31
32
{
  ycmd,
  vimPlugins,
  gopls,
  ...
}:

let
  ycmd-go = ycmd.overrideAttrs (
    final: prev: {
      pname = prev.pname + "-go";

      installPhase =
        prev.installPhase
        + ''
          TARGET=$out/lib/ycmd/third_party/go/bin
          mkdir -p $TARGET
          ln -sf ${gopls}/bin/gopls $TARGET
        '';
    }
  );
in
vimPlugins.YouCompleteMe.overrideAttrs (
  final: prev: {
    buildPhase =
      prev.buildPhase
      + ''
        rm third_party/ycmd
        ln -s ${ycmd-go}/lib/ycmd third_party
      '';
  }
)