radare2: 5.9.8 -> 6.0.2
This commit is contained in:
parent
41a26e79e2
commit
776601b613
@ -3,82 +3,73 @@
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
buildPackages,
|
||||
pkg-config,
|
||||
meson,
|
||||
ninja,
|
||||
libusb-compat-0_1,
|
||||
readline,
|
||||
libewf,
|
||||
perl,
|
||||
zlib,
|
||||
openssl,
|
||||
libuv,
|
||||
capstone,
|
||||
file,
|
||||
libzip,
|
||||
xxHash,
|
||||
gtk2,
|
||||
vte,
|
||||
gtkdialog,
|
||||
python3,
|
||||
ruby,
|
||||
libewf,
|
||||
libusb-compat-0_1,
|
||||
libuv,
|
||||
libzip,
|
||||
lua,
|
||||
lz4,
|
||||
capstone,
|
||||
meson,
|
||||
ninja,
|
||||
openssl,
|
||||
perl,
|
||||
pkg-config,
|
||||
python3,
|
||||
readline,
|
||||
ruby,
|
||||
vte,
|
||||
xxHash,
|
||||
zlib,
|
||||
useX11 ? false,
|
||||
rubyBindings ? false,
|
||||
luaBindings ? false,
|
||||
}:
|
||||
|
||||
let
|
||||
# NOTE: Check these revision changes when updating the package.
|
||||
# https://github.com/radareorg/radare2/blob/master/libr/arch/p/arm/v35/Makefile#L25-L26
|
||||
arm64 = fetchFromGitHub {
|
||||
owner = "radareorg";
|
||||
repo = "vector35-arch-arm64";
|
||||
rev = "55d73c6bbb94448a5c615933179e73ac618cf876";
|
||||
hash = "sha256-pZxxp5xDg8mgkGEx7LaBSoKxNPyggFYA4um9YaO20LU=";
|
||||
binaryninja = fetchFromGitHub {
|
||||
owner = "Vector35";
|
||||
repo = "binaryninja-api";
|
||||
rev = "c40a5f04deec68d388b2072dc42b29141089f9ce"; # https://github.com/radareorg/radare2/blob/master/subprojects/binaryninja.wrap
|
||||
hash = "sha256-IfuGgwVI51urQxhaYkYsE45NkScgxKmmEBV6Pllhwmo=";
|
||||
};
|
||||
armv7 = fetchFromGitHub {
|
||||
owner = "radareorg";
|
||||
repo = "vector35-arch-armv7";
|
||||
rev = "f270a6cc99644cb8e76055b6fa632b25abd26024";
|
||||
hash = "sha256-YhfgJ7M8ys53jh1clOzj0I2yfJshXQm5zP0L9kMYsmk=";
|
||||
|
||||
sdb = fetchFromGitHub {
|
||||
owner = "radare";
|
||||
repo = "sdb";
|
||||
tag = "2.2.0"; # https://github.com/radareorg/radare2/blob/master/subprojects/sdb.wrap
|
||||
hash = "sha256-S/aL3F6+Z/rqelfIJaZaBF1IxSmhA1qE9ahFvKARoaE=";
|
||||
};
|
||||
|
||||
qjs = fetchFromGitHub {
|
||||
owner = "quickjs-ng";
|
||||
repo = "quickjs";
|
||||
rev = "7238ee64dbc2fbdea044555cda8cda78785a93ed"; # https://github.com/radareorg/radare2/blob/master/subprojects/qjs.wrap
|
||||
hash = "sha256-1ZeLCTmbrlRrZB9El3L497gt3QUA5GIScrFVIBkxA88=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "radare2";
|
||||
version = "5.9.8";
|
||||
version = "6.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "radare";
|
||||
repo = "radare2";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-XSnv0yWEPlXHUPjf1Qu50AN3Gvgr0o6Q4e0dOyRdO9A=";
|
||||
hash = "sha256-uCMf+pNqyjRLeNJlE8Kk6PQCIRBjidO/XGHeNV/F1lA=";
|
||||
};
|
||||
|
||||
preBuild = ''
|
||||
pushd ../libr/arch/p/arm/v35
|
||||
cp -r ${arm64} arch-arm64
|
||||
chmod -R +w arch-arm64
|
||||
|
||||
cp -r ${armv7} arch-armv7
|
||||
chmod -R +w arch-armv7
|
||||
popd
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
install_name_tool -add_rpath $out/lib $out/lib/libr_io.${finalAttrs.version}.dylib
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
"-Dr2_gittap=${finalAttrs.version}"
|
||||
"-Duse_sys_capstone=true"
|
||||
"-Duse_sys_lz4=true"
|
||||
"-Duse_sys_magic=true"
|
||||
"-Duse_sys_openssl=true"
|
||||
"-Duse_sys_xxhash=true"
|
||||
"-Duse_sys_zip=true"
|
||||
"-Duse_sys_zlib=true"
|
||||
(lib.mesonOption "use_sys_capstone" "true")
|
||||
(lib.mesonOption "use_sys_lz4" "true")
|
||||
(lib.mesonOption "use_sys_magic" "true")
|
||||
(lib.mesonOption "use_sys_openssl" "true")
|
||||
(lib.mesonOption "use_sys_xxhash" "true")
|
||||
(lib.mesonOption "use_sys_zip" "true")
|
||||
(lib.mesonOption "use_sys_zlib" "true")
|
||||
(lib.mesonOption "r2_gittap" finalAttrs.version)
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@ -97,14 +88,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
buildInputs = [
|
||||
capstone
|
||||
file
|
||||
readline
|
||||
libusb-compat-0_1
|
||||
libewf
|
||||
perl
|
||||
zlib
|
||||
openssl
|
||||
libusb-compat-0_1
|
||||
libuv
|
||||
lz4
|
||||
openssl
|
||||
perl
|
||||
readline
|
||||
zlib
|
||||
]
|
||||
++ lib.optionals useX11 [
|
||||
gtkdialog
|
||||
@ -121,7 +112,28 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
xxHash
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
postUnpack = ''
|
||||
pushd $sourceRoot/subprojects
|
||||
|
||||
cp -r ${binaryninja} binaryninja
|
||||
chmod -R +w binaryninja
|
||||
cp packagefiles/binaryninja/meson.build binaryninja
|
||||
|
||||
cp -r ${sdb} sdb
|
||||
chmod -R +w sdb
|
||||
|
||||
cp -r ${qjs} qjs
|
||||
chmod -R +w qjs
|
||||
cp packagefiles/qjs/meson.build qjs
|
||||
|
||||
popd
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
install_name_tool -add_rpath $out/lib $out/lib/libr_io.${finalAttrs.version}.dylib
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "UNIX-like reverse engineering framework and command-line toolset";
|
||||
longDescription = ''
|
||||
r2 is a complete rewrite of radare. It provides a set of libraries, tools
|
||||
@ -140,18 +152,18 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
homepage = "https://radare.org";
|
||||
changelog = "https://github.com/radareorg/radare2/releases/tag/${finalAttrs.version}";
|
||||
license = with licenses; [
|
||||
license = with lib.licenses; [
|
||||
gpl3Only
|
||||
lgpl3Only
|
||||
];
|
||||
maintainers = with maintainers; [
|
||||
maintainers = with lib.maintainers; [
|
||||
arkivm
|
||||
azahi
|
||||
raskin
|
||||
makefu
|
||||
mic92
|
||||
arkivm
|
||||
raskin
|
||||
];
|
||||
mainProgram = "radare2";
|
||||
platforms = platforms.unix;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user