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