2021-03-21 18:04:26 +00:00
|
|
|
{ buildDunePackage
|
|
|
|
, stdlib-shims
|
|
|
|
, ppx_yojson_conv_lib
|
|
|
|
, ocaml-syntax-shims
|
|
|
|
, yojson
|
|
|
|
, result
|
2021-04-12 07:13:25 +01:00
|
|
|
, fetchurl
|
2021-03-21 18:04:26 +00:00
|
|
|
, lib
|
2021-04-12 07:13:25 +01:00
|
|
|
, ocaml
|
2021-03-21 18:04:26 +00:00
|
|
|
}:
|
|
|
|
|
2021-04-12 07:13:25 +01:00
|
|
|
let params =
|
|
|
|
if lib.versionAtLeast ocaml.version "4.12"
|
|
|
|
then {
|
|
|
|
version = "1.5.0";
|
|
|
|
sha256 = "0g82m3jrp4s0m3fn9xmm8khrb3acccq8ns9p62bqa09pjd4vgdk2";
|
|
|
|
} else {
|
|
|
|
version = "1.4.1";
|
|
|
|
sha256 = "1ssyazc0yrdng98cypwa9m3nzfisdzpp7hqnx684rqj8f0g3gs6f";
|
|
|
|
}
|
|
|
|
; in
|
2021-03-21 18:04:26 +00:00
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "jsonrpc";
|
2021-04-12 07:13:25 +01:00
|
|
|
inherit (params) version;
|
|
|
|
src = fetchurl {
|
2021-03-21 18:04:26 +00:00
|
|
|
url = "https://github.com/ocaml/ocaml-lsp/releases/download/${version}/jsonrpc-${version}.tbz";
|
2021-04-12 07:13:25 +01:00
|
|
|
inherit (params) sha256;
|
2021-03-21 18:04:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
useDune2 = true;
|
|
|
|
minimumOCamlVersion = "4.06";
|
|
|
|
|
2021-04-12 07:13:25 +01:00
|
|
|
buildInputs = [ yojson stdlib-shims ocaml-syntax-shims ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ 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;
|
|
|
|
maintainers = with maintainers; [ symphorien marsam ];
|
|
|
|
};
|
|
|
|
}
|