28 , rubyBindings ? false
33 # FIXME: Compare revision with
34 # https://github.com/radareorg/radare2/blob/master/libr/arch/p/arm/v35/Makefile#L26-L27
35 arm64 = fetchFromGitHub {
37 repo = "vector35-arch-arm64";
38 rev = "55d73c6bbb94448a5c615933179e73ac618cf876";
39 hash = "sha256-pZxxp5xDg8mgkGEx7LaBSoKxNPyggFYA4um9YaO20LU=";
41 armv7 = fetchFromGitHub {
43 repo = "vector35-arch-armv7";
44 rev = "f270a6cc99644cb8e76055b6fa632b25abd26024";
45 hash = "sha256-YhfgJ7M8ys53jh1clOzj0I2yfJshXQm5zP0L9kMYsmk=";
48 stdenv.mkDerivation rec {
52 src = fetchFromGitHub {
55 rev = "refs/tags/${version}";
56 hash = "sha256-JGNV5xSyrjcO2ZgOjzDqzfZyALPSCyA3DZx/D8ffmKA=";
60 pushd ../libr/arch/p/arm/v35
61 cp -r ${arm64} arch-arm64
62 chmod -R +w arch-arm64
64 cp -r ${armv7} arch-armv7
65 chmod -R +w arch-armv7
69 postFixup = lib.optionalString stdenv.isDarwin ''
70 install_name_tool -add_rpath $out/lib $out/lib/libr_io.${version}.dylib
74 "-Duse_sys_capstone=true"
75 "-Duse_sys_magic=true"
77 "-Duse_sys_xxhash=true"
79 "-Dr2_gittap=${version}"
82 enableParallelBuilding = true;
83 depsBuildBuild = [ buildPackages.stdenv.cc ];
87 nativeBuildInputs = [ pkg-config meson ninja python3 ];
99 ] ++ lib.optionals useX11 [ gtkdialog vte gtk2 ]
100 ++ lib.optionals rubyBindings [ ruby ]
101 ++ lib.optionals luaBindings [ lua ];
103 propagatedBuildInputs = [
104 # radare2 exposes r_lib which depends on these libraries
105 file # for its list of magic numbers (`libmagic`)
111 description = "UNIX-like reverse engineering framework and command-line tools";
112 homepage = "https://radare.org";
113 changelog = "https://github.com/radareorg/radare2/releases/tag/${version}";
114 license = licenses.gpl2Plus;
115 maintainers = with maintainers; [ azahi raskin makefu mic92 arkivm ];
116 platforms = platforms.unix;