summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/bdd/default.nix
blob: 1bf495d2223bae6c61633339006f9dcdc2ed2a83 (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
33
34
35
{
  lib,
  buildDunePackage,
  fetchFromGitHub,
  stdlib-shims,
}:

buildDunePackage (finalAttrs: {
  pname = "bdd";
  version = "0.5";

  src = fetchFromGitHub {
    owner = "backtracking";
    repo = "ocaml-bdd";
    tag = finalAttrs.version;
    hash = "sha256-bhgKpo7gGkjbI75pzckfQulZnTstj6G5QcErLgIGneU=";
  };

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

  propagatedBuildInputs = [
    stdlib-shims
  ];

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