nixpkgs/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix
Antonio Nuno Monteiro 669cfc195f ocaml-lsp, lsp, jsonrpc: allow overriding the source globally
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-03-21 12:17:08 -07:00

45 lines
895 B
Nix

{ buildDunePackage
, 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 = [
stdlib-shims
ppx_yojson_conv_lib
ocaml-syntax-shims
octavius
uutf
csexp
dune-build-info
omd
cmdliner
jsonrpc
];
meta = jsonrpc.meta // {
description = "LSP protocol implementation in OCaml";
};
}