ocamlPackages.bap: update to janestreet 0.17

libbap: mark as broken
This commit is contained in:
Vincent Laporte 2025-06-11 04:57:16 +02:00
parent 1e8f3e3f47
commit 3cbaba6d9d
No known key found for this signature in database
5 changed files with 29 additions and 36 deletions

View File

@ -45,5 +45,6 @@ stdenv.mkDerivation {
maintainers = [ maintainers.maurer ];
platforms = platforms.unix;
license = licenses.mit;
broken = true; # Not compatible with JaneStreet libraries 0.17
};
}

View File

@ -22,8 +22,8 @@ index 966c407..fba3fb4 100644
Bap_llvm_ogre_samples,
Bap_llvm_ogre_types
CCOpt: $cc_optimization
- CCLib: $llvm_lib $cxxlibs $llvm_ldflags -lcurses
+ CCLib: $llvm_lib $cxxlibs $llvm_ldflags -lncurses
- CCLib: $llvm_lib $cxxlibs $llvm_ldflags -lcurses -lzstd
+ CCLib: $llvm_lib $cxxlibs $llvm_ldflags -lncurses -lzstd
CSources: llvm_disasm.h,
llvm_disasm.c,
llvm_stubs.c,

View File

@ -13,6 +13,7 @@
core_kernel,
ezjsonm,
fileutils,
jane_rope ? null,
mmap,
lwt,
ocamlgraph,
@ -27,7 +28,7 @@
frontc,
ounit,
ppx_jane,
parsexp,
parsexp ? null,
utop,
libxml2,
ncurses,
@ -47,12 +48,12 @@ else
stdenv.mkDerivation rec {
pname = "ocaml${ocaml.version}-bap";
version = "2.5.0";
version = "2.5.0+pr1621";
src = fetchFromGitHub {
owner = "BinaryAnalysisPlatform";
repo = "bap";
rev = "v${version}";
sha256 = "1c30zxn0zyi0wypvjmik3fd6n6a8xjcb102qfnccn1af052bvsrd";
rev = "65c282d94e8b7028e8a986c637db3a2378a753f6";
hash = "sha256-LUZZOgG1T8xa5jLA/fDft8ofYb/Yf6QjTrl6AlLY7H0=";
};
sigs = fetchurl {
@ -95,6 +96,7 @@ else
core_kernel
ezjsonm
fileutils
jane_rope
mmap
lwt
ocamlgraph
@ -132,7 +134,7 @@ else
];
preConfigure = ''
substituteInPlace oasis/elf-loader --replace bitstring.ppx ppx_bitstring
substituteInPlace oasis/monads --replace-warn core_kernel.rope jane_rope
'';
configureFlags = [

View File

@ -2,22 +2,23 @@
lib,
buildDunePackage,
fetchFromGitHub,
ppx_assert,
ppx_bench,
ppx_bin_prot,
ppx_compare,
ppx_enumerate,
fetchpatch,
ppx_assert ? null,
ppx_bench ? null,
ppx_bin_prot ? null,
ppx_compare ? null,
ppx_enumerate ? null,
ppx_expect,
ppx_hash,
ppx_here,
ppx_optcomp,
ppx_sexp_conv,
ppx_sexp_value,
ppx_sexp_value ? null,
}:
buildDunePackage rec {
pname = "ppx_bap";
version = "0.14";
duneVersion = "3";
minimalOCamlVersion = "4.07";
@ -28,6 +29,12 @@ buildDunePackage rec {
sha256 = "1c6rcdp8bicdiwqc2mb59cl9l2vxlp3y8hmnr9x924fq7acly248";
};
# Support ppx_expect
patches = fetchpatch {
url = "https://github.com/BinaryAnalysisPlatform/ppx_bap/commit/7f197648978758fbcbf553da50d7a9248d34f7e4.patch";
hash = "sha256-oOdcA06mb0W5jDhF4nutEijy6yu/6kMjKOUcNxUSk6k=";
};
buildInputs = [
ppx_optcomp
ppx_sexp_value
@ -39,6 +46,7 @@ buildDunePackage rec {
ppx_bin_prot
ppx_compare
ppx_enumerate
ppx_expect
ppx_hash
ppx_here
ppx_sexp_conv

View File

@ -80,7 +80,9 @@ let
backoff = callPackage ../development/ocaml-modules/backoff { };
bap = janeStreet_0_15.bap;
bap = callPackage ../development/ocaml-modules/bap {
inherit (pkgs.llvmPackages_14) llvm;
};
base64 = callPackage ../development/ocaml-modules/base64 { };
@ -980,26 +982,6 @@ let
zstd
;
};
# Packages that are not part of janestreet libraries, but still depend
# on v0.15 are kept in this scope, too.
bap =
let
ppxlib = jsDeps.ppxlib;
lwt_ppx = self.lwt_ppx.override { inherit ppxlib; };
sedlex = self.sedlex.override { inherit ppxlib ppx_expect; };
in
callPackage ../development/ocaml-modules/bap {
inherit (pkgs.llvmPackages_14) llvm;
ezjsonm = self.ezjsonm.override { inherit sexplib0; };
ppx_bitstring = self.ppx_bitstring.override { inherit ppxlib; };
ocurl = self.ocurl.override { inherit lwt_ppx; };
piqi = self.piqi.override { inherit sedlex; };
piqi-ocaml = self.piqi-ocaml.override { inherit piqi; };
};
ppx_bap = callPackage ../development/ocaml-modules/ppx_bap { };
}
)).overrideScope
liftJaneStreet;
@ -1726,7 +1708,7 @@ let
pprint = callPackage ../development/ocaml-modules/pprint { };
ppx_bap = janeStreet_0_15.ppx_bap;
ppx_bap = callPackage ../development/ocaml-modules/ppx_bap { };
ppx_bitstring = callPackage ../development/ocaml-modules/bitstring/ppx.nix { };