From 18f2c5f5b860733ecbd499ebd74a72c685f8917d Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 5 May 2023 10:42:06 +0200 Subject: [PATCH] ocamlPackages.lsp: fix propagatedInputs --- .../ocaml-modules/ocaml-lsp/lsp.nix | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix b/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix index 32e8fbaf2ef7..b067614f5058 100644 --- a/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix +++ b/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix @@ -84,11 +84,31 @@ buildDunePackage rec { nativeBuildInputs = lib.optional (lib.versionOlder version "1.7.0") cppo; - propagatedBuildInputs = [ - csexp - jsonrpc - uutf - ] ++ lib.optional (lib.versionOlder version "1.7.0") stdlib-shims; + propagatedBuildInputs = + if lib.versionAtLeast version "1.14.0" then [ + jsonrpc + ppx_yojson_conv_lib + uutf + ] else if lib.versionAtLeast version "1.10.0" then [ + dyn + jsonrpc + ordering + ppx_yojson_conv_lib + stdune + uutf + ] else if lib.versionAtLeast version "1.7.0" then [ + csexp + jsonrpc + pp + ppx_yojson_conv_lib + uutf + ] else [ + csexp + jsonrpc + ppx_yojson_conv_lib + stdlib-shims + uutf + ]; meta = jsonrpc.meta // { description = "LSP protocol implementation in OCaml";