2021-12-07 20:41:08 +00:00
|
|
|
{ lib, buildDunePackage, jsonrpc, lsp, re, makeWrapper, dot-merlin-reader, spawn }:
|
2020-12-17 04:20:00 +00:00
|
|
|
|
2020-10-25 18:27:09 +00:00
|
|
|
buildDunePackage {
|
|
|
|
pname = "ocaml-lsp-server";
|
2021-03-21 18:04:26 +00:00
|
|
|
inherit (jsonrpc) version src;
|
2020-10-25 18:27:09 +00:00
|
|
|
useDune2 = true;
|
|
|
|
|
2021-03-21 18:04:26 +00:00
|
|
|
inherit (lsp) preBuild;
|
2020-10-25 18:27:09 +00:00
|
|
|
|
2021-12-07 20:41:08 +00:00
|
|
|
buildInputs = lsp.buildInputs ++ [ lsp re ]
|
|
|
|
++ lib.optional (lib.versionAtLeast jsonrpc.version "1.9") spawn;
|
2020-10-25 18:27:09 +00:00
|
|
|
|
2021-03-21 21:09:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/ocamllsp --prefix PATH : ${dot-merlin-reader}/bin
|
|
|
|
'';
|
|
|
|
|
2021-03-21 18:04:26 +00:00
|
|
|
meta = jsonrpc.meta // {
|
2020-10-25 18:27:09 +00:00
|
|
|
description = "OCaml Language Server Protocol implementation";
|
|
|
|
};
|
|
|
|
}
|