about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/bdd/default.nix
blob: 358d92d3505dced6002054bf33bc4088bc1c230c (plain) (blame)
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
{ lib
, buildDunePackage
, fetchFromGitHub
, stdlib-shims
}:

buildDunePackage {
  pname = "bdd";
  version = "unstable-2022-07-14";

  duneVersion = "3";

  src = fetchFromGitHub {
    owner = "backtracking";
    repo = "ocaml-bdd";
    rev = "6d1b1d3c24e5784b87e599a00230ce652acb2dcc";
    hash = "sha256-3mJZlAFQsI7AgrNQOe6N94CDfX5gXYqQBooV0jcoYEA=";
  };

  # Fix build with OCaml 4.02
  postPatch = ''
    substituteInPlace lib/bdd.ml \
      --replace "Buffer.truncate Format.stdbuf 0;" "Buffer.clear Format.stdbuf;"
  '';

  propagatedBuildInputs = [
    stdlib-shims
  ];

  meta = with lib; {
    description = "Quick implementation of a Binary Decision Diagrams (BDD) library for OCaml";
    homepage = "https://github.com/backtracking/ocaml-bdd";
    license = licenses.lgpl21Plus;
    maintainers = with maintainers; [ wegank ];
  };
}