summaryrefslogtreecommitdiff
path: root/pkgs/development/ocaml-modules/bitstring/ppx.nix
blob: 9215c8293d28008a0672c39d04c67f310edd8c31 (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
{
  lib,
  buildDunePackage,
  fetchpatch,
  ocaml,
  bitstring,
  ppxlib,
  ounit,
}:

buildDunePackage {
  pname = "ppx_bitstring";
  inherit (bitstring) version src;

  patches = lib.optional (lib.versionAtLeast ppxlib.version "0.36") (fetchpatch {
    url = "https://github.com/xguerin/bitstring/commit/b42d4924cbb5ec5fd5309e6807852b63f456f35d.patch";
    hash = "sha256-wtpSnGOzIUTmB3LhyHGopecy7F/5SYFOwaR6eReV+6g=";
  });

  buildInputs = [
    bitstring
    ppxlib
  ];

  doCheck = lib.versionAtLeast ocaml.version "4.08";
  checkInputs = [ ounit ];

  meta = bitstring.meta // {
    description = "Bitstrings and bitstring matching for OCaml - PPX extension";
    broken = lib.versionOlder ppxlib.version "0.18.0";
  };
}