forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / development / ocaml-modules / ocaml-lsp / jsonrpc.nix
blob1a2a97d21f2bd2d764ac2cb0d961227e6bdea3e1
1 { buildDunePackage
2 , stdlib-shims
3 , ppx_yojson_conv_lib
4 , ocaml-syntax-shims
5 , yojson
6 , result
7 , fetchurl
8 , lib
9 , ocaml
10 , version ?
11     if lib.versionAtLeast ocaml.version "5.02" then
12       "1.19.0"
13     else if lib.versionAtLeast ocaml.version "4.14" then
14       "1.18.0"
15     else if lib.versionAtLeast ocaml.version "4.13" then
16       "1.10.5"
17     else if lib.versionAtLeast ocaml.version "4.12" then
18       "1.9.0"
19     else
20       "1.4.1"
23 let params = {
24   "1.19.0" = {
25     name = "lsp";
26     minimalOCamlVersion = "5.02";
27     sha256 = "sha256-54PZ8af4nOG/TJFIqjSiKDaL0Um7zKQ96AtFkiHe5ew=";
28   };
29   "1.18.0" = {
30     name = "lsp";
31     minimalOCamlVersion = "4.14";
32     sha256 = "sha256-tZ2kPM/S/9J3yeX2laDjnHLA144b8svy9iwae32nXwM=";
33   };
34   "1.17.0" = {
35     name = "lsp";
36     minimalOCamlVersion = "4.14";
37     sha256 = "sha256-j7i71xfu/SYItNg0WBBbZg4N46ETTcj8IWrmWdTRlgA=";
38   };
39   "1.14.2" = {
40     name = "lsp";
41     minimalOCamlVersion = "4.14";
42     sha256 = "sha256-1R+HYaGbPLGDs5DMN3jmnrZFMhMmPUHgF+s+yNzIVJQ=";
43   };
44   "1.10.5" = {
45     name = "jsonrpc";
46     minimalOCamlVersion = "4.13";
47     sha256 = "sha256-TeJS6t1ruWhWPvWNatrnSUWI6T17XKiosHLYizBDDcw=";
48   };
49   "1.9.0" = {
50     name = "jsonrpc";
51     minimalOCamlVersion = "4.12";
52     sha256 = "sha256:1ac44n6g3rf84gvhcca545avgf9vpkwkkkm0s8ipshfhp4g4jikh";
53   };
54   "1.4.1" = {
55     name = "jsonrpc";
56     minimalOCamlVersion = "4.06";
57     sha256 = "1ssyazc0yrdng98cypwa9m3nzfisdzpp7hqnx684rqj8f0g3gs6f";
58   };
59 }."${version}"; in
61 buildDunePackage rec {
62   pname = "jsonrpc";
63   inherit version;
64   src = fetchurl {
65     url = "https://github.com/ocaml/ocaml-lsp/releases/download/${version}/${params.name}-${version}.tbz";
66     inherit (params) sha256;
67   };
69   inherit (params) minimalOCamlVersion;
71   buildInputs =
72     if lib.versionAtLeast version "1.7.0" then
73       [ ]
74     else
75       [ yojson stdlib-shims ocaml-syntax-shims ];
77   propagatedBuildInputs =
78     if lib.versionAtLeast version "1.7.0" then
79       [ ]
80     else
81       [ ppx_yojson_conv_lib result ];
83   meta = with lib; {
84     description = "Jsonrpc protocol implementation in OCaml";
85     license = licenses.isc;
86     platforms = platforms.unix;
87     maintainers = [ ];
88   };