nixpkgs/pkgs/development/ocaml-modules/ocaml-lsp/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
777 B
Nix
Raw Normal View History

2022-11-08 08:14:16 +00:00
{ lib, buildDunePackage, lsp, xdg, re, fiber, makeWrapper, dot-merlin-reader, spawn, ocamlc-loc }:
buildDunePackage rec {
2020-10-25 18:27:09 +00:00
pname = "ocaml-lsp-server";
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 ]
++ lib.optional (lib.versionAtLeast version "1.9") spawn
2022-11-08 08:14:16 +00:00
++ lib.optionals (lib.versionAtLeast version "1.10") [ fiber xdg ]
++ lib.optional (lib.versionAtLeast version "1.14.2") ocamlc-loc;
2020-10-25 18:27:09 +00:00
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/ocamllsp --prefix PATH : ${dot-merlin-reader}/bin
'';
meta = lsp.meta // {
2020-10-25 18:27:09 +00:00
description = "OCaml Language Server Protocol implementation";
mainProgram = "ocamllsp";
2020-10-25 18:27:09 +00:00
};
}