about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix
blob: 6e172dee6ee67c7e776441e39e5de892a37e42c0 (plain) (blame)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ buildDunePackage
, cppo
, stdlib-shims
, ppx_yojson_conv_lib
, ocaml-syntax-shims
, jsonrpc
, omd
, octavius
, dune-build-info
, uutf
, csexp
, cmdliner
}:

buildDunePackage {
  pname = "lsp";
  inherit (jsonrpc) version src;
  useDune2 = true;
  minimumOCamlVersion = "4.06";

  # unvendor some (not all) dependencies.
  # They are vendored by upstream only because it is then easier to install
  # ocaml-lsp without messing with your opam switch, but nix should prevent
  # this type of problems without resorting to vendoring.
  preBuild = ''
    rm -r ocaml-lsp-server/vendor/{octavius,uutf,ocaml-syntax-shims,omd,cmdliner}
  '';

  buildInputs = [
    cppo
    ppx_yojson_conv_lib
    ocaml-syntax-shims
    octavius
    dune-build-info
    omd
    cmdliner
  ];

  propagatedBuildInputs = [
    csexp
    jsonrpc
    stdlib-shims
    uutf
  ];

  meta = jsonrpc.meta // {
    description = "LSP protocol implementation in OCaml";
  };
}