diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-01-26 18:06:19 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-01-26 18:21:18 +0000 |
commit | 7ac6743433dd45ceaead2ca96f6356dc0d064ce6 (patch) | |
tree | b68ec89d7d2a8d2b6e6b1ff94ba26d6af4096350 /nixpkgs/pkgs/development/ocaml-modules/bap | |
parent | c5c7451dbef37b51f52792d6395a670ef5183d27 (diff) | |
parent | 891f607d5301d6730cb1f9dcf3618bcb1ab7f10e (diff) | |
download | nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.gz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.bz2 nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.lz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.xz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.zst nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.zip |
Merge commit '891f607d5301d6730cb1f9dcf3618bcb1ab7f10e'
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/bap')
-rw-r--r-- | nixpkgs/pkgs/development/ocaml-modules/bap/curses_is_ncurses.patch (renamed from nixpkgs/pkgs/development/ocaml-modules/bap/dont-add-curses.patch) | 2 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/ocaml-modules/bap/default.nix | 31 |
2 files changed, 18 insertions, 15 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/bap/dont-add-curses.patch b/nixpkgs/pkgs/development/ocaml-modules/bap/curses_is_ncurses.patch index 438a1bfc6dc0..0b012848601f 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/bap/dont-add-curses.patch +++ b/nixpkgs/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/nixpkgs/pkgs/development/ocaml-modules/bap/default.nix b/nixpkgs/pkgs/development/ocaml-modules/bap/default.nix index 66b1dd67a9f2..9284bbaf9c62 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/bap/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/bap/default.nix @@ -1,17 +1,18 @@ -{ 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 +{ lib, 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, ncurses +, ppx_bitstring +, ppx_tools_versioned +, which, makeWrapper, writeText , z3 }: -if !stdenv.lib.versionAtLeast ocaml.version "4.07" +if !lib.versionAtLeast ocaml.version "4.07" then throw "BAP is not available for OCaml ${ocaml.version}" else -if stdenv.lib.versionAtLeast core_kernel.version "0.13" +if lib.versionAtLeast core_kernel.version "0.13" then throw "BAP needs core_kernel-0.12 (hence OCaml 4.07)" else @@ -40,9 +41,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ which makeWrapper ]; buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis - llvm ppx_tools_versioned + 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 ]; @@ -61,13 +62,15 @@ 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" ]; + preConfigure = '' + substituteInPlace oasis/elf --replace bitstring.ppx ppx_bitstring + ''; - BAPBUILDFLAGS = "-j $(NIX_BUILD_CORES)"; + configureFlags = [ "--enable-everything ${disableIda}" "--with-llvm-config=${llvm}/bin/llvm-config" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Platform for binary analysis. It is written in OCaml, but can be used from other languages."; homepage = "https://github.com/BinaryAnalysisPlatform/bap/"; maintainers = [ maintainers.maurer ]; |