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