2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, bap, ocaml, findlib, ctypes, autoreconfHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
which }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "libbap";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "master-2020-11-25";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "BinaryAnalysisPlatform";
|
|
|
|
repo = "bap-bindings";
|
2021-03-09 03:18:52 +00:00
|
|
|
rev = "3193cb31e1b1f2455406ea0c819dad9dfa2ba10d";
|
|
|
|
sha256 = "0m4spva3z6fgbwlg4zq53l5p227dic893q2qq65pvzxyf7k7nmil";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile.in \
|
|
|
|
--replace "-linkpkg" "-thread -linkpkg"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook which ];
|
|
|
|
buildInputs = [ ocaml bap findlib ctypes ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/lib
|
|
|
|
mkdir -p $out/include
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/binaryanalysisplatform/bap-bindings";
|
|
|
|
description = "A C library for interacting with BAP";
|
|
|
|
maintainers = [ maintainers.maurer ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|