Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 23 lines 724 B view raw
1{ lib, buildDunePackage, lsp, xdg, re, fiber, makeWrapper, dot-merlin-reader, spawn, ocamlc-loc }: 2 3buildDunePackage rec { 4 pname = "ocaml-lsp-server"; 5 inherit (lsp) version src preBuild; 6 duneVersion = "3"; 7 8 buildInputs = lsp.buildInputs ++ [ lsp re ] 9 ++ lib.optional (lib.versionAtLeast version "1.9") spawn 10 ++ lib.optionals (lib.versionAtLeast version "1.10") [ fiber xdg ] 11 ++ lib.optional (lib.versionAtLeast version "1.14.2") ocamlc-loc; 12 13 nativeBuildInputs = [ makeWrapper ]; 14 15 postInstall = '' 16 wrapProgram $out/bin/ocamllsp --prefix PATH : ${dot-merlin-reader}/bin 17 ''; 18 19 meta = lsp.meta // { 20 description = "OCaml Language Server Protocol implementation"; 21 mainProgram = "ocamllsp"; 22 }; 23}