summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/encore/default.nix
blob: c93d6cb60ba9deb47ca7cca45a9773fc829a772f (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
36
37
38
39
40
41
42
{
  lib,
  buildDunePackage,
  fetchurl,
  fmt,
  bigstringaf,
  angstrom,
  alcotest,
}:

buildDunePackage (finalAttrs: {
  pname = "encore";
  version = "0.8.1";

  minimalOCamlVersion = "4.07";

  src = fetchurl {
    url = "https://github.com/mirage/encore/releases/download/v${finalAttrs.version}/encore-${finalAttrs.version}.tbz";
    hash = "sha256-qg6heSBc6OSfb7vZxEi4rrKh+nx+ffnsCfVvhVR3yY0=";
  };

  propagatedBuildInputs = [
    angstrom
    fmt
    bigstringaf
  ];
  checkInputs = [ alcotest ];
  doCheck = true;

  meta = {
    homepage = "https://github.com/mirage/encore";
    description = "Library to generate encoder/decoder which ensure isomorphism";
    longDescription = ''
      Encore is a little library to provide an interface to generate an angstrom decoder and
      an internal encoder from a shared description. The goal is to ensure a dual isomorphism
      between them.
    '';
    changelog = "https://raw.githubusercontent.com/mirage/encore/refs/tags/v${finalAttrs.version}/CHANGES.md";
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.vbgl ];
  };
})