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.

23 lines
698 B
Nix
Raw Normal View History

{ lib, buildDunePackage, lsp, xdg, re, fiber, makeWrapper, dot-merlin-reader, spawn }:
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
++ lib.optionals (lib.versionAtLeast version "1.10") [ fiber xdg ];
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
};
}