Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 64 lines 1.5 kB view raw
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}: 11 12let params = 13 if lib.versionAtLeast ocaml.version "4.14" 14 then { 15 name = "lsp"; 16 version = "1.14.2"; 17 sha256 = "sha256-1R+HYaGbPLGDs5DMN3jmnrZFMhMmPUHgF+s+yNzIVJQ="; 18 } else if lib.versionAtLeast ocaml.version "4.13" 19 then { 20 name = "jsonrpc"; 21 version = "1.10.5"; 22 sha256 = "sha256-TeJS6t1ruWhWPvWNatrnSUWI6T17XKiosHLYizBDDcw="; 23 } else if lib.versionAtLeast ocaml.version "4.12" 24 then { 25 name = "jsonrpc"; 26 version = "1.9.0"; 27 sha256 = "sha256:1ac44n6g3rf84gvhcca545avgf9vpkwkkkm0s8ipshfhp4g4jikh"; 28 } else { 29 name = "jsonrpc"; 30 version = "1.4.1"; 31 sha256 = "1ssyazc0yrdng98cypwa9m3nzfisdzpp7hqnx684rqj8f0g3gs6f"; 32 } 33; in 34 35buildDunePackage rec { 36 pname = "jsonrpc"; 37 inherit (params) version; 38 src = fetchurl { 39 url = "https://github.com/ocaml/ocaml-lsp/releases/download/${version}/${params.name}-${version}.tbz"; 40 inherit (params) sha256; 41 }; 42 43 duneVersion = "3"; 44 minimalOCamlVersion = "4.06"; 45 46 buildInputs = 47 if lib.versionAtLeast version "1.7.0" then 48 [ ] 49 else 50 [ yojson stdlib-shims ocaml-syntax-shims ]; 51 52 propagatedBuildInputs = 53 if lib.versionAtLeast version "1.7.0" then 54 [ ] 55 else 56 [ ppx_yojson_conv_lib result ]; 57 58 meta = with lib; { 59 description = "Jsonrpc protocol implementation in OCaml"; 60 license = licenses.isc; 61 platforms = platforms.unix; 62 maintainers = with maintainers; [ marsam ]; 63 }; 64}