1{
2 lib,
3 buildDunePackage,
4 ocaml,
5 bitstring,
6 ppxlib,
7 ounit,
8}:
9
10if lib.versionOlder ppxlib.version "0.18.0" then
11 throw "ppx_bitstring is not available with ppxlib-${ppxlib.version}"
12else
13
14 buildDunePackage {
15 pname = "ppx_bitstring";
16 inherit (bitstring) version src;
17
18 duneVersion = "3";
19
20 buildInputs = [
21 bitstring
22 ppxlib
23 ];
24
25 doCheck = lib.versionAtLeast ocaml.version "4.08";
26 checkInputs = [ ounit ];
27
28 meta = bitstring.meta // {
29 description = "Bitstrings and bitstring matching for OCaml - PPX extension";
30 };
31 }