summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/cbor/default.nix
blob: bf9abd34ab74d34a4114cd6ec7f33c0e25387c84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
  lib,
  buildDunePackage,
  fetchurl,
  ocplib-endian,
  yojson,
}:

buildDunePackage (finalAttrs: {
  pname = "cbor";
  version = "0.5";

  minimalOCamlVersion = "4.07.0";

  src = fetchurl {
    url = "https://github.com/ygrek/ocaml-cbor/releases/download/${finalAttrs.version}/ocaml-cbor-${finalAttrs.version}.tar.gz";
    hash = "sha256-4mpm/fv9X5uFRQO8XqBhOpxYwZreEtJ3exIwN6YulKM=";
  };

  propagatedBuildInputs = [
    ocplib-endian
  ];

  doCheck = true;
  checkInputs = [
    yojson
  ];

  meta = {
    description = "CBOR encoder/decoder (RFC 7049) - native OCaml implementation";
    homepage = "https://github.com/ygrek/ocaml-cbor";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ infinidoge ];
  };
})