diff options
Diffstat (limited to 'pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix')
-rw-r--r-- | pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix b/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix index c1a97641f240d..91d0d231e0bd5 100644 --- a/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix +++ b/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix @@ -21,11 +21,24 @@ , cmdliner , ordering , ocamlformat-rpc-lib +, ocaml +, version ? + if lib.versionAtLeast ocaml.version "4.14" then + "1.16.2" + else if lib.versionAtLeast ocaml.version "4.13" then + "1.10.5" + else if lib.versionAtLeast ocaml.version "4.12" then + "1.9.0" + else + "1.4.1" }: +let jsonrpc_v = jsonrpc.override { + inherit version; +}; in buildDunePackage rec { pname = "lsp"; - inherit (jsonrpc) version src; + inherit (jsonrpc_v) version src; duneVersion = "3"; minimalOCamlVersion = if lib.versionAtLeast version "1.7.0" then |