|
52 | 52 | yojson |
53 | 53 | ]; |
54 | 54 | }; |
| 55 | + merlin-lib_4_16_501 = let version = "4.16-501"; |
| 56 | + in ocamlPackages.buildDunePackage { |
| 57 | + pname = "merlin-lib"; |
| 58 | + inherit version; |
| 59 | + src = pkgs.fetchurl { |
| 60 | + url = |
| 61 | + "https://github.com/ocaml/merlin/releases/download/v${version}/merlin-${version}.tbz"; |
| 62 | + sha256 = "sha256-2lvzCbBAZFwpKuRXLMagpwDb0rz8mWrBPI5cODbCHiY="; |
| 63 | + }; |
| 64 | + buildInputs = with ocamlPackages; [ csexp ]; |
| 65 | + }; |
| 66 | + merlinLibVersionByOcamlLspVersion = |
| 67 | + # Note that the version constraints in the ocaml-lsp-server package |
| 68 | + # are too broad and will try to use a version of merlin-lib too |
| 69 | + # recent to be compatible in some cases. This table maps versions |
| 70 | + # of ocaml-lsp-server to known compatible versions of merlin-lib. |
| 71 | + { |
| 72 | + "1.18.0" = merlin-lib_4_16_501; |
| 73 | + "1.19.0" = ocamlPackages.merlin-lib; |
| 74 | + }; |
| 75 | + merlin-lib-for-this-ocaml-lsp = |
| 76 | + merlinLibVersionByOcamlLspVersion."${version}"; |
55 | 77 | in (ocamlPackages.buildDunePackage { |
56 | 78 | pname = "ocaml-lsp-server"; |
57 | 79 | inherit src version; |
|
65 | 87 | fiber |
66 | 88 | jsonrpc |
67 | 89 | lsp |
68 | | - merlin-lib |
| 90 | + merlin-lib-for-this-ocaml-lsp |
69 | 91 | ocamlc-loc |
70 | 92 | ocamlformat-rpc-lib |
71 | 93 | ppx_yojson_conv_lib |
|
91 | 113 | isStatic = true; |
92 | 114 | strip = true; |
93 | 115 | }; |
| 116 | + ocaml_lsp_server_1_18_0_ocaml_5_1_1_static = ocamllspPackage { |
| 117 | + version = "1.18.0"; |
| 118 | + ocamlPackages = ocamlPackages_5_1; |
| 119 | + isStatic = true; |
| 120 | + strip = true; |
| 121 | + }; |
94 | 122 | }; |
95 | 123 | dynamicPackages = with pkgs.ocaml-ng; { |
96 | 124 | ocaml_lsp_server_1_19_0_ocaml_5_2_0_dynamic = ocamllspPackage { |
|
100 | 128 | strip = |
101 | 129 | false; # stripping on macos produces executables that don't work |
102 | 130 | }; |
| 131 | + ocaml_lsp_server_1_18_0_ocaml_5_1_1_dynamic = ocamllspPackage { |
| 132 | + version = "1.18.0"; |
| 133 | + ocamlPackages = ocamlPackages_5_1; |
| 134 | + isStatic = false; |
| 135 | + strip = |
| 136 | + false; # stripping on macos produces executables that don't work |
| 137 | + }; |
103 | 138 | }; |
104 | 139 | in { packages = staticPackages // dynamicPackages; }); |
105 | 140 | } |
0 commit comments