From 7fc644d39ad5dd5b99b7e3bd9ffbbd2a50d12a5a Mon Sep 17 00:00:00 2001 From: Pamplemousse Date: Fri, 8 Jan 2021 15:18:14 -0700 Subject: [PATCH] ocamlPackages.bap: Correct build dependencies As pointed upstream: https://github.com/BinaryAnalysisPlatform/bap/issues/1261#issuecomment-754926500 Signed-off-by: Pamplemousse --- ...-add-curses.patch => curses_is_ncurses.patch} | 2 +- pkgs/development/ocaml-modules/bap/default.nix | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) rename pkgs/development/ocaml-modules/bap/{dont-add-curses.patch => curses_is_ncurses.patch} (94%) diff --git a/pkgs/development/ocaml-modules/bap/dont-add-curses.patch b/pkgs/development/ocaml-modules/bap/curses_is_ncurses.patch similarity index 94% rename from pkgs/development/ocaml-modules/bap/dont-add-curses.patch rename to pkgs/development/ocaml-modules/bap/curses_is_ncurses.patch index 438a1bfc6dc0af..0b012848601fdb 100644 --- a/pkgs/development/ocaml-modules/bap/dont-add-curses.patch +++ b/pkgs/development/ocaml-modules/bap/curses_is_ncurses.patch @@ -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, diff --git a/pkgs/development/ocaml-modules/bap/default.nix b/pkgs/development/ocaml-modules/bap/default.nix index 66b1dd67a9f223..2869f78d592dfe 100644 --- a/pkgs/development/ocaml-modules/bap/default.nix +++ b/pkgs/development/ocaml-modules/bap/default.nix @@ -1,9 +1,9 @@ { 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_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_tools_versioned +, which, makeWrapper, writeText , z3 }: @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis llvm 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 ]; @@ -61,12 +61,10 @@ stdenv.mkDerivation rec { disableIda = "--disable-ida"; - patches = [ ./dont-add-curses.patch ]; + patches = [ ./curses_is_ncurses.patch ]; 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/";