1{ stdenv, fetchFromGitHub, bap, ocaml, findlib, ctypes, autoreconfHook,
2 which }:
3
4stdenv.mkDerivation rec {
5 name = "libbap-${version}";
6 version = "master-2018-03-01";
7
8 src = fetchFromGitHub {
9 owner = "BinaryAnalysisPlatform";
10 repo = "bap-bindings";
11 rev = "bd125c379a784d4265c2ddcf1f6e34bde2e568d4";
12 sha256 = "0dp90djyjc262v1b1cw5irp424a8394y86fyprdk8z741wg56m3v";
13 };
14
15 nativeBuildInputs = [ autoreconfHook which ];
16 buildInputs = [ ocaml bap findlib ctypes ];
17
18 preInstall = ''
19 mkdir -p $out/lib
20 mkdir -p $out/include
21 '';
22
23 meta = with stdenv.lib; {
24 homepage = https://github.com/binaryanalysisplatform/bap-bindings;
25 description = "A C library for interacting with BAP";
26 maintainers = [ maintainers.maurer ];
27 platforms = platforms.unix;
28 license = licenses.mit;
29 };
30}