ocamlPackages.ocaml-lsp: wrap with dot-merlin-reader

this requires that dot-merlin-reader be built with the same ocaml version as
ocaml-lsp
This commit is contained in:
Symphorien Gibol 2021-03-21 22:09:52 +01:00
parent 7a6d0468bf
commit d08e1d78e7
4 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,4 @@
{ buildDunePackage, jsonrpc, lsp }: { buildDunePackage, jsonrpc, lsp, makeWrapper, dot-merlin-reader }:
buildDunePackage { buildDunePackage {
pname = "ocaml-lsp-server"; pname = "ocaml-lsp-server";
@ -9,6 +9,12 @@ buildDunePackage {
buildInputs = lsp.buildInputs ++ [ lsp ]; buildInputs = lsp.buildInputs ++ [ lsp ];
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/ocamllsp --prefix PATH : ${dot-merlin-reader}/bin
'';
meta = jsonrpc.meta // { meta = jsonrpc.meta // {
description = "OCaml Language Server Protocol implementation"; description = "OCaml Language Server Protocol implementation";
}; };

View File

@ -1,6 +1,4 @@
{ lib, fetchurl, ocamlPackages }: { lib, fetchurl, yojson, csexp, result, buildDunePackage }:
with ocamlPackages;
buildDunePackage rec { buildDunePackage rec {
pname = "dot-merlin-reader"; pname = "dot-merlin-reader";

View File

@ -2240,7 +2240,7 @@ in
dotenv-linter = callPackage ../development/tools/analysis/dotenv-linter { }; dotenv-linter = callPackage ../development/tools/analysis/dotenv-linter { };
dot-merlin-reader = callPackage ../development/tools/ocaml/merlin/dot-merlin-reader.nix { }; inherit (ocamlPackages) dot-merlin-reader;
dozenal = callPackage ../applications/misc/dozenal { }; dozenal = callPackage ../applications/misc/dozenal { };

View File

@ -624,6 +624,8 @@ let
merlin-extend = callPackage ../development/ocaml-modules/merlin-extend { }; merlin-extend = callPackage ../development/ocaml-modules/merlin-extend { };
dot-merlin-reader = callPackage ../development/tools/ocaml/merlin/dot-merlin-reader.nix { };
metrics = callPackage ../development/ocaml-modules/metrics { }; metrics = callPackage ../development/ocaml-modules/metrics { };
metrics-influx = callPackage ../development/ocaml-modules/metrics/influx.nix { }; metrics-influx = callPackage ../development/ocaml-modules/metrics/influx.nix { };