1{
2 lib,
3 buildDunePackage,
4 fetchFromGitHub,
5 stdlib-shims,
6}:
7
8buildDunePackage {
9 pname = "bdd";
10 version = "unstable-2022-07-14";
11
12 duneVersion = "3";
13
14 src = fetchFromGitHub {
15 owner = "backtracking";
16 repo = "ocaml-bdd";
17 rev = "6d1b1d3c24e5784b87e599a00230ce652acb2dcc";
18 hash = "sha256-3mJZlAFQsI7AgrNQOe6N94CDfX5gXYqQBooV0jcoYEA=";
19 };
20
21 # Fix build with OCaml 4.02
22 postPatch = ''
23 substituteInPlace lib/bdd.ml \
24 --replace "Buffer.truncate Format.stdbuf 0;" "Buffer.clear Format.stdbuf;"
25 '';
26
27 propagatedBuildInputs = [
28 stdlib-shims
29 ];
30
31 meta = with lib; {
32 description = "Quick implementation of a Binary Decision Diagrams (BDD) library for OCaml";
33 homepage = "https://github.com/backtracking/ocaml-bdd";
34 license = licenses.lgpl21Plus;
35 maintainers = with maintainers; [ wegank ];
36 };
37}