Merge pull request #119209 from vbgl/ocaml-jsonrpc-1.5.0

ocamlPackages.jsonrpc: 1.4.1 → 1.5.0
This commit is contained in:
Guillaume Girol 2021-04-12 17:12:59 +00:00 committed by GitHub
commit d63606560b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,23 +4,36 @@
, ocaml-syntax-shims , ocaml-syntax-shims
, yojson , yojson
, result , result
, fetchzip , fetchurl
, lib , lib
, ocaml
}: }:
let params =
if lib.versionAtLeast ocaml.version "4.12"
then {
version = "1.5.0";
sha256 = "0g82m3jrp4s0m3fn9xmm8khrb3acccq8ns9p62bqa09pjd4vgdk2";
} else {
version = "1.4.1";
sha256 = "1ssyazc0yrdng98cypwa9m3nzfisdzpp7hqnx684rqj8f0g3gs6f";
}
; in
buildDunePackage rec { buildDunePackage rec {
pname = "jsonrpc"; pname = "jsonrpc";
version = "1.4.1"; inherit (params) version;
src = fetchzip { src = fetchurl {
url = "https://github.com/ocaml/ocaml-lsp/releases/download/${version}/jsonrpc-${version}.tbz"; url = "https://github.com/ocaml/ocaml-lsp/releases/download/${version}/jsonrpc-${version}.tbz";
sha256 = "0hzpw17qfhb0cxgwah1fv4k300r363dy1kv0977anl44dlanx1v5"; inherit (params) sha256;
}; };
useDune2 = true; useDune2 = true;
minimumOCamlVersion = "4.06"; minimumOCamlVersion = "4.06";
buildInputs = [ yojson stdlib-shims ocaml-syntax-shims ppx_yojson_conv_lib result ]; buildInputs = [ yojson stdlib-shims ocaml-syntax-shims ];
propagatedBuildInputs = [ ppx_yojson_conv_lib result ];
meta = with lib; { meta = with lib; {
description = "Jsonrpc protocol implementation in OCaml"; description = "Jsonrpc protocol implementation in OCaml";