about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/ocaml-lsp
diff options
context:
space:
mode:
authorSymphorien Gibol <symphorien+git@xlumurb.eu>2021-03-21 22:09:52 +0100
committerSymphorien Gibol <symphorien+git@xlumurb.eu>2021-03-21 22:09:52 +0100
commitd08e1d78e74e20afd3abd993fb3de5738cbcf14f (patch)
treeec48d7d96ab0261aac7dda561fbd2ef710d1c3fe /pkgs/development/ocaml-modules/ocaml-lsp
parent7a6d0468bfe2210113636be6f9ce62ed9b9656c5 (diff)
ocamlPackages.ocaml-lsp: wrap with dot-merlin-reader
this requires that dot-merlin-reader be built with the same ocaml version as
ocaml-lsp
Diffstat (limited to 'pkgs/development/ocaml-modules/ocaml-lsp')
-rw-r--r--pkgs/development/ocaml-modules/ocaml-lsp/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/development/ocaml-modules/ocaml-lsp/default.nix b/pkgs/development/ocaml-modules/ocaml-lsp/default.nix
index 7ff18822e9373..a56621465f345 100644
--- a/pkgs/development/ocaml-modules/ocaml-lsp/default.nix
+++ b/pkgs/development/ocaml-modules/ocaml-lsp/default.nix
@@ -1,4 +1,4 @@
-{ buildDunePackage, jsonrpc, lsp }:
+{ buildDunePackage, jsonrpc, lsp, makeWrapper, dot-merlin-reader }:
 
 buildDunePackage {
   pname = "ocaml-lsp-server";
@@ -9,6 +9,12 @@ buildDunePackage {
 
   buildInputs = lsp.buildInputs ++ [ lsp ];
 
+  nativeBuildInputs = [ makeWrapper ];
+
+  postInstall = ''
+    wrapProgram $out/bin/ocamllsp --prefix PATH : ${dot-merlin-reader}/bin
+  '';
+
   meta = jsonrpc.meta // {
     description = "OCaml Language Server Protocol implementation";
   };