My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/ocaml-modules/ocaml-lsp/default.nix

22 lines
698 B

{ lib, buildDunePackage, lsp, xdg, re, fiber, makeWrapper, dot-merlin-reader, spawn }:
buildDunePackage rec {
pname = "ocaml-lsp-server";
inherit (lsp) version src preBuild;
duneVersion = if lib.versionAtLeast version "1.10.0" then "3" else "2";
buildInputs = lsp.buildInputs ++ [ lsp re ]
++ lib.optional (lib.versionAtLeast version "1.9") spawn
++ lib.optionals (lib.versionAtLeast version "1.10") [ fiber xdg ];
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/ocamllsp --prefix PATH : ${dot-merlin-reader}/bin
'';
meta = lsp.meta // {
description = "OCaml Language Server Protocol implementation";
mainProgram = "ocamllsp";
};
}