2021-12-19 01:06:50 +00:00
|
|
|
{ lib, buildDunePackage, jsonrpc, lsp, re, makeWrapper, dot-merlin-reader, spawn }:
|
2020-11-09 15:59:12 +00:00
|
|
|
|
|
|
|
buildDunePackage {
|
|
|
|
pname = "ocaml-lsp-server";
|
2021-03-23 19:22:30 +00:00
|
|
|
inherit (jsonrpc) version src;
|
2020-11-09 15:59:12 +00:00
|
|
|
useDune2 = true;
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
inherit (lsp) preBuild;
|
2020-11-09 15:59:12 +00:00
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
buildInputs = lsp.buildInputs ++ [ lsp re ]
|
|
|
|
++ lib.optional (lib.versionAtLeast jsonrpc.version "1.9") spawn;
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/ocamllsp --prefix PATH : ${dot-merlin-reader}/bin
|
|
|
|
'';
|
2020-11-09 15:59:12 +00:00
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
meta = jsonrpc.meta // {
|
2020-11-09 15:59:12 +00:00
|
|
|
description = "OCaml Language Server Protocol implementation";
|
|
|
|
};
|
|
|
|
}
|