Skip to content

Commit

Permalink
ocamlPackages.bap: Correct build dependencies
Browse files Browse the repository at this point in the history
As pointed upstream:
  BinaryAnalysisPlatform/bap#1261 (comment)

Signed-off-by: Pamplemousse <xav.maso@gmail.com>
  • Loading branch information
Pamplemousse authored and vbgl committed Jan 11, 2021
1 parent c7f5dcb commit 9ff7368
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Expand Up @@ -23,7 +23,7 @@ index 966c407..fba3fb4 100644
Bap_llvm_ogre_types
CCOpt: $cc_optimization
- CCLib: $llvm_lib $cxxlibs $llvm_ldflags -lcurses
+ CCLib: $llvm_lib $cxxlibs $llvm_ldflags
+ CCLib: $llvm_lib $cxxlibs $llvm_ldflags -lncurses
CSources: llvm_disasm.h,
llvm_disasm.c,
llvm_stubs.c,
Expand Down
18 changes: 8 additions & 10 deletions pkgs/development/ocaml-modules/bap/default.nix
@@ -1,10 +1,10 @@
{ stdenv, fetchFromGitHub, fetchurl
, ocaml, findlib, ocamlbuild, ocaml_oasis,
bitstring, camlzip, cmdliner, core_kernel, ezjsonm, fileutils, ocaml_lwt, ocamlgraph, ocurl, re, uri, zarith, piqi, piqi-ocaml, uuidm, llvm, frontc, ounit, ppx_jane, parsexp,
utop, libxml2,
ppx_bitstring,
ppx_tools_versioned,
which, makeWrapper, writeText
, ocaml, findlib, ocamlbuild, ocaml_oasis
, bitstring, camlzip, cmdliner, core_kernel, ezjsonm, fileutils, ocaml_lwt, ocamlgraph, ocurl, re, uri, zarith, piqi, piqi-ocaml, uuidm, llvm, frontc, ounit, ppx_jane, parsexp
, utop, libxml2, ncurses
, ppx_bitstring
, ppx_tools_versioned
, which, makeWrapper, writeText
, z3
}:

Expand Down Expand Up @@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis
llvm ppx_bitstring ppx_tools_versioned
z3
utop libxml2 ];
utop libxml2 ncurses ];

propagatedBuildInputs = [ bitstring camlzip cmdliner ppx_jane core_kernel ezjsonm fileutils ocaml_lwt ocamlgraph ocurl re uri zarith piqi parsexp
piqi-ocaml uuidm frontc ounit ];
Expand All @@ -62,16 +62,14 @@ stdenv.mkDerivation rec {

disableIda = "--disable-ida";

patches = [ ./dont-add-curses.patch ];
patches = [ ./curses_is_ncurses.patch ];

preConfigure = ''
substituteInPlace oasis/elf --replace bitstring.ppx ppx_bitstring
'';

configureFlags = [ "--enable-everything ${disableIda}" "--with-llvm-config=${llvm}/bin/llvm-config" ];

BAPBUILDFLAGS = "-j $(NIX_BUILD_CORES)";

meta = with stdenv.lib; {
description = "Platform for binary analysis. It is written in OCaml, but can be used from other languages.";
homepage = "https://github.com/BinaryAnalysisPlatform/bap/";
Expand Down

0 comments on commit 9ff7368

Please sign in to comment.