2022-04-24 12:00:00 +00:00
|
|
|
{ lib, buildDunePackage, lsp, xdg, re, fiber, makeWrapper, dot-merlin-reader, spawn }:
|
2020-12-17 04:20:00 +00:00
|
|
|
|
2022-04-24 12:00:00 +00:00
|
|
|
buildDunePackage rec {
|
2020-10-25 18:27:09 +00:00
|
|
|
pname = "ocaml-lsp-server";
|
2022-04-24 12:00:00 +00:00
|
|
|
inherit (lsp) version src preBuild;
|
|
|
|
duneVersion = if lib.versionAtLeast version "1.10.0" then "3" else "2";
|
2020-10-25 18:27:09 +00:00
|
|
|
|
2021-12-07 20:41:08 +00:00
|
|
|
buildInputs = lsp.buildInputs ++ [ lsp re ]
|
2022-04-24 12:00:00 +00:00
|
|
|
++ lib.optional (lib.versionAtLeast version "1.9") spawn
|
|
|
|
++ lib.optionals (lib.versionAtLeast version "1.10") [ fiber xdg ];
|
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
|
|
|
|
'';
|
|
|
|
|
2022-04-24 12:00:00 +00:00
|
|
|
meta = lsp.meta // {
|
2020-10-25 18:27:09 +00:00
|
|
|
description = "OCaml Language Server Protocol implementation";
|
2022-05-13 23:48:49 +00:00
|
|
|
mainProgram = "ocamllsp";
|
2020-10-25 18:27:09 +00:00
|
|
|
};
|
|
|
|
}
|