2021-03-21 18:04:26 +00:00
|
|
|
{ buildDunePackage
|
|
|
|
, stdlib-shims
|
|
|
|
, ppx_yojson_conv_lib
|
|
|
|
, ocaml-syntax-shims
|
|
|
|
, yojson
|
|
|
|
, result
|
2021-04-12 06:13:25 +00:00
|
|
|
, fetchurl
|
2021-03-21 18:04:26 +00:00
|
|
|
, lib
|
2021-04-12 06:13:25 +00:00
|
|
|
, ocaml
|
2023-08-13 03:47:05 +00:00
|
|
|
, version ?
|
|
|
|
if lib.versionAtLeast ocaml.version "4.14" then
|
2024-07-10 20:34:24 +00:00
|
|
|
"1.18.0"
|
2023-08-13 03:47:05 +00:00
|
|
|
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"
|
2021-03-21 18:04:26 +00:00
|
|
|
}:
|
|
|
|
|
2023-08-13 03:47:05 +00:00
|
|
|
let params = {
|
2024-07-10 20:34:24 +00:00
|
|
|
"1.18.0" = {
|
|
|
|
name = "lsp";
|
|
|
|
minimalOCamlVersion = "4.14";
|
|
|
|
sha256 = "sha256-tZ2kPM/S/9J3yeX2laDjnHLA144b8svy9iwae32nXwM=";
|
|
|
|
};
|
2024-02-13 04:20:00 +00:00
|
|
|
"1.17.0" = {
|
2023-08-13 03:47:05 +00:00
|
|
|
name = "lsp";
|
|
|
|
minimalOCamlVersion = "4.14";
|
2024-02-13 04:20:00 +00:00
|
|
|
sha256 = "sha256-j7i71xfu/SYItNg0WBBbZg4N46ETTcj8IWrmWdTRlgA=";
|
2023-08-13 03:47:05 +00:00
|
|
|
};
|
|
|
|
"1.14.2" = {
|
2022-07-17 12:00:00 +00:00
|
|
|
name = "lsp";
|
2023-08-13 03:47:05 +00:00
|
|
|
minimalOCamlVersion = "4.14";
|
2022-11-08 08:14:16 +00:00
|
|
|
sha256 = "sha256-1R+HYaGbPLGDs5DMN3jmnrZFMhMmPUHgF+s+yNzIVJQ=";
|
2023-08-13 03:47:05 +00:00
|
|
|
};
|
|
|
|
"1.10.5" = {
|
2022-07-17 12:00:00 +00:00
|
|
|
name = "jsonrpc";
|
2023-08-13 03:47:05 +00:00
|
|
|
minimalOCamlVersion = "4.13";
|
2022-04-24 12:00:00 +00:00
|
|
|
sha256 = "sha256-TeJS6t1ruWhWPvWNatrnSUWI6T17XKiosHLYizBDDcw=";
|
2023-08-13 03:47:05 +00:00
|
|
|
};
|
|
|
|
"1.9.0" = {
|
2022-07-17 12:00:00 +00:00
|
|
|
name = "jsonrpc";
|
2023-08-13 03:47:05 +00:00
|
|
|
minimalOCamlVersion = "4.12";
|
2021-12-07 20:41:08 +00:00
|
|
|
sha256 = "sha256:1ac44n6g3rf84gvhcca545avgf9vpkwkkkm0s8ipshfhp4g4jikh";
|
2023-08-13 03:47:05 +00:00
|
|
|
};
|
|
|
|
"1.4.1" = {
|
2022-07-17 12:00:00 +00:00
|
|
|
name = "jsonrpc";
|
2023-08-13 03:47:05 +00:00
|
|
|
minimalOCamlVersion = "4.06";
|
2021-04-12 06:13:25 +00:00
|
|
|
sha256 = "1ssyazc0yrdng98cypwa9m3nzfisdzpp7hqnx684rqj8f0g3gs6f";
|
2023-08-13 03:47:05 +00:00
|
|
|
};
|
|
|
|
}."${version}"; in
|
2021-03-21 18:04:26 +00:00
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "jsonrpc";
|
2023-08-13 03:47:05 +00:00
|
|
|
inherit version;
|
2021-04-12 06:13:25 +00:00
|
|
|
src = fetchurl {
|
2022-07-17 12:00:00 +00:00
|
|
|
url = "https://github.com/ocaml/ocaml-lsp/releases/download/${version}/${params.name}-${version}.tbz";
|
2021-04-12 06:13:25 +00:00
|
|
|
inherit (params) sha256;
|
2021-03-21 18:04:26 +00:00
|
|
|
};
|
|
|
|
|
2023-08-13 03:47:05 +00:00
|
|
|
inherit (params) minimalOCamlVersion;
|
2021-03-21 18:04:26 +00:00
|
|
|
|
2021-08-30 08:05:16 +00:00
|
|
|
buildInputs =
|
|
|
|
if lib.versionAtLeast version "1.7.0" then
|
|
|
|
[ ]
|
|
|
|
else
|
|
|
|
[ yojson stdlib-shims ocaml-syntax-shims ];
|
2021-04-12 06:13:25 +00:00
|
|
|
|
2021-08-30 08:05:16 +00:00
|
|
|
propagatedBuildInputs =
|
|
|
|
if lib.versionAtLeast version "1.7.0" then
|
|
|
|
[ ]
|
|
|
|
else
|
|
|
|
[ ppx_yojson_conv_lib result ];
|
2021-03-21 18:04:26 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Jsonrpc protocol implementation in OCaml";
|
|
|
|
license = licenses.isc;
|
|
|
|
platforms = platforms.unix;
|
2024-07-28 14:44:11 +00:00
|
|
|
maintainers = [ ];
|
2021-03-21 18:04:26 +00:00
|
|
|
};
|
|
|
|
}
|