summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/ppx_bap/default.nix
blob: e8d4f8159e85bf572c7f80caa7f866d26484e9fc (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
  lib,
  buildDunePackage,
  fetchFromGitHub,
  fetchpatch,
  ppx_assert ? null,
  ppx_bench ? null,
  ppx_bin_prot ? null,
  ppx_compare ? null,
  ppx_enumerate ? null,
  ppx_expect,
  ppx_hash,
  ppx_here,
  ppx_optcomp,
  ppx_sexp_conv,
  ppx_sexp_value ? null,
}:

buildDunePackage (finalAttrs: {
  pname = "ppx_bap";
  version = "0.14";

  minimalOCamlVersion = "4.07";

  src = fetchFromGitHub {
    owner = "BinaryAnalysisPlatform";
    repo = "ppx_bap";
    rev = "v${finalAttrs.version}";
    sha256 = "1c6rcdp8bicdiwqc2mb59cl9l2vxlp3y8hmnr9x924fq7acly248";
  };

  # Support ppx_expect
  patches = fetchpatch {
    url = "https://github.com/BinaryAnalysisPlatform/ppx_bap/commit/7f197648978758fbcbf553da50d7a9248d34f7e4.patch";
    hash = "sha256-oOdcA06mb0W5jDhF4nutEijy6yu/6kMjKOUcNxUSk6k=";
  };

  buildInputs = [
    ppx_optcomp
    ppx_sexp_value
  ];

  propagatedBuildInputs = [
    ppx_assert
    ppx_bench
    ppx_bin_prot
    ppx_compare
    ppx_enumerate
    ppx_expect
    ppx_hash
    ppx_here
    ppx_sexp_conv
  ];

  meta = {
    description = "Set of ppx rewriters for BAP";
    inherit (finalAttrs.src.meta) homepage;
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.vbgl ];
    mainProgram = "ppx-bap";
  };
})