2021-03-21 19:04:26 +01:00
|
|
|
{ buildDunePackage
|
2021-08-07 14:00:00 +02:00
|
|
|
, lib
|
2021-07-21 10:11:00 +02:00
|
|
|
, cppo
|
2021-03-21 19:04:26 +01:00
|
|
|
, stdlib-shims
|
|
|
|
, ppx_yojson_conv_lib
|
|
|
|
, ocaml-syntax-shims
|
|
|
|
, jsonrpc
|
|
|
|
, omd
|
|
|
|
, octavius
|
|
|
|
, dune-build-info
|
|
|
|
, uutf
|
2021-08-07 14:00:00 +02:00
|
|
|
, pp
|
2021-03-21 19:04:26 +01:00
|
|
|
, csexp
|
|
|
|
, cmdliner
|
|
|
|
}:
|
|
|
|
|
2021-08-30 10:28:10 +02:00
|
|
|
buildDunePackage rec {
|
2021-03-21 19:04:26 +01:00
|
|
|
pname = "lsp";
|
|
|
|
inherit (jsonrpc) version src;
|
|
|
|
useDune2 = true;
|
2021-08-30 10:28:10 +02:00
|
|
|
minimumOCamlVersion =
|
|
|
|
if lib.versionAtLeast version "1.7.0" then
|
|
|
|
"4.12"
|
|
|
|
else
|
|
|
|
"4.06";
|
2021-03-21 19:04:26 +01:00
|
|
|
|
|
|
|
# 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 = ''
|
2021-08-07 14:00:00 +02:00
|
|
|
rm -r ocaml-lsp-server/vendor/{octavius,uutf,omd,cmdliner}
|
2021-03-21 19:04:26 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-07-21 10:11:00 +02:00
|
|
|
cppo
|
2021-03-21 19:04:26 +01:00
|
|
|
ppx_yojson_conv_lib
|
|
|
|
ocaml-syntax-shims
|
|
|
|
octavius
|
|
|
|
dune-build-info
|
|
|
|
omd
|
|
|
|
cmdliner
|
2021-08-07 14:00:00 +02:00
|
|
|
] ++ lib.optional (lib.versionAtLeast jsonrpc.version "1.7.0") pp;
|
2021-07-21 10:11:00 +02:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
csexp
|
2021-03-21 19:04:26 +01:00
|
|
|
jsonrpc
|
2021-07-21 10:11:00 +02:00
|
|
|
stdlib-shims
|
|
|
|
uutf
|
2021-03-21 19:04:26 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = jsonrpc.meta // {
|
|
|
|
description = "LSP protocol implementation in OCaml";
|
|
|
|
};
|
|
|
|
}
|