@@ -2,28 +2,26 @@
22, ocaml, findlib, ocamlbuild, ocaml_oasis
33, bitstring, camlzip, cmdliner, core_kernel, ezjsonm, fileutils, ocaml_lwt, ocamlgraph, ocurl, re, uri, zarith, piqi, piqi-ocaml, uuidm, llvm, frontc, ounit, ppx_jane, parsexp
44, utop, libxml2, ncurses
5+, linenoise
6+, ppx_bap
57, ppx_bitstring
6−, ppx_tools_versioned
8+, yojson
79, which, makeWrapper, writeText
810, z3
911}:
1012
11−if !lib.versionAtLeast ocaml.version "4.07"
13+if !lib.versionAtLeast ocaml.version "4.08"
1214then throw "BAP is not available for OCaml ${ocaml.version}"
1315else
1416
15−if lib.versionAtLeast core_kernel.version "0.13"
16−then throw "BAP needs core_kernel-0.12 (hence OCaml 4.07)"
17−else
18−
1917stdenv.mkDerivation rec {
2018 name = "ocaml${ocaml.version}-bap-${version}";
21− version = "2.1.0";
19+ version = "2.2.0";
2220 src = fetchFromGitHub {
2321 owner = "BinaryAnalysisPlatform";
2422 repo = "bap";
2523 rev = "v${version}";
26− sha256 = "10fkr6p798ad18j4h9bvp9dg4pmjdpv3hmj7k389i0vhqniwi5xq";
24+ sha256 = "0c53sps6ba9n5cjdmapi8ylzlpcc11pksijp9swzlwgxyz5d276f";
2725 };
2826
2927 sigs = fetchurl {
@@ -41,12 +39,14 @@ stdenv.mkDerivation rec {
4139 nativeBuildInputs = [ which makeWrapper ];
4240
4341 buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis
44− llvm ppx_bitstring ppx_tools_versioned
42+ linenoise
43+ ounit
44+ ppx_bitstring
4545 z3
4646 utop libxml2 ncurses ];
4747
48− propagatedBuildInputs = [ bitstring camlzip cmdliner ppx_jane core_kernel ezjsonm fileutils ocaml_lwt ocamlgraph ocurl re uri zarith piqi parsexp
49− piqi-ocaml uuidm frontc ounit ];
48+ propagatedBuildInputs = [ bitstring camlzip cmdliner ppx_bap core_kernel ezjsonm fileutils ocaml_lwt ocamlgraph ocurl re uri zarith piqi parsexp
49+ piqi-ocaml uuidm frontc yojson ];
5050
5151 installPhase = ''
5252 export OCAMLPATH=$OCAMLPATH:$OCAMLFIND_DESTDIR;
@@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
6565 patches = [ ./curses_is_ncurses.patch ];
6666
6767 preConfigure = ''
68− substituteInPlace oasis/elf --replace bitstring.ppx ppx_bitstring
68+ substituteInPlace oasis/elf-loader --replace bitstring.ppx ppx_bitstring
6969 '';
7070
7171 configureFlags = [ "--enable-everything ${disableIda}" "--with-llvm-config=${llvm}/bin/llvm-config" ];