From 26ea5dc66e4ddabe09f41c0f26d3f69b67139b4e Mon Sep 17 00:00:00 2001 From: Amadej Kastelic Date: Sat, 17 May 2025 22:14:07 +0200 Subject: [PATCH 1/4] rizin: 0.7.4 -> 0.8.1 --- .../0001-fix-compilation-with-clang.patch | 30 ---------------- .../rizin/0002-disable-pcre2-jit.patch | 36 ------------------- .../tools/analysis/rizin/default.nix | 8 ++--- 3 files changed, 2 insertions(+), 72 deletions(-) delete mode 100644 pkgs/development/tools/analysis/rizin/0001-fix-compilation-with-clang.patch delete mode 100644 pkgs/development/tools/analysis/rizin/0002-disable-pcre2-jit.patch diff --git a/pkgs/development/tools/analysis/rizin/0001-fix-compilation-with-clang.patch b/pkgs/development/tools/analysis/rizin/0001-fix-compilation-with-clang.patch deleted file mode 100644 index adb1eebb3e17..000000000000 --- a/pkgs/development/tools/analysis/rizin/0001-fix-compilation-with-clang.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 93acbc13cf271faf6025e96991eb3ab65062f90f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= -Date: Sat, 9 Mar 2024 09:35:24 +0100 -Subject: [PATCH] fix compilation with clang -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Jörg Thalheim ---- - librz/analysis/p/analysis_xtensa.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/librz/analysis/p/analysis_xtensa.c b/librz/analysis/p/analysis_xtensa.c -index 4a32d2037c..f7331ae376 100644 ---- a/librz/analysis/p/analysis_xtensa.c -+++ b/librz/analysis/p/analysis_xtensa.c -@@ -21,7 +21,8 @@ typedef struct { - static bool xtensa_init(void **user) { - XtensaContext *ctx = RZ_NEW0(XtensaContext); - rz_return_val_if_fail(ctx, false); -- memcpy(ctx->length_table, (int[16]){ 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 8, 8 }, sizeof(ctx->length_table)); -+ int temp_length_table[16] = { 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 8, 8 }; -+ memcpy(ctx->length_table, temp_length_table, sizeof(ctx->length_table)); - ctx->insn_buffer = NULL; - ctx->slot_buffer = NULL; - *user = ctx; --- -2.43.1 - diff --git a/pkgs/development/tools/analysis/rizin/0002-disable-pcre2-jit.patch b/pkgs/development/tools/analysis/rizin/0002-disable-pcre2-jit.patch deleted file mode 100644 index 4a10f44612c1..000000000000 --- a/pkgs/development/tools/analysis/rizin/0002-disable-pcre2-jit.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/meson.build b/meson.build -index a8153a2ee5..787cbfae06 100644 ---- a/meson.build -+++ b/meson.build -@@ -197,7 +197,7 @@ endif - - # Handle PCRE2 - cpu_jit_supported = [ 'aarch64', 'arm', 'mips', 'mips64', 'ppc', 'ppc64', 'riscv32', 'riscv64', 's390x', 'x86', 'x86_64' ] --pcre2_jit_supported = target_machine.cpu_family() in cpu_jit_supported and cc.get_id() != 'tcc' and target_machine.system() != 'darwin' -+pcre2_jit_supported = false - if pcre2_jit_supported - add_project_arguments(['-DSUPPORTS_PCRE2_JIT'], language: 'c') - endif -diff --git a/subprojects/packagefiles/pcre2/meson.build b/subprojects/packagefiles/pcre2/meson.build -index b40ea85740..f3ee7a02ed 100644 ---- a/subprojects/packagefiles/pcre2/meson.build -+++ b/subprojects/packagefiles/pcre2/meson.build -@@ -60,18 +60,6 @@ cpu_jit_supported = [ 'aarch64', 'arm', 'mips', 'mips64', 'ppc', 'ppc64', 'riscv - # tcc doesn't support the MSVC asm syntax PCRE2 uses (`__asm { ... }`). - # Darwin kernel not as well, because of forbidden wx memory. - # It is used in the JIT compiler code. --if cc.get_id() != 'tcc' and target_machine.cpu_family() in cpu_jit_supported and target_machine.system() != 'darwin' -- libpcre2_c_args += ['-DSUPPORT_JIT'] -- pcre2_files += ['src/pcre2_jit_compile.c'] --endif -- --if target_machine.system() == 'openbsd' -- # jit compilation fails with "no more memory" if wx allocations are allowed. -- libpcre2_c_args += ['-DSLJIT_WX_EXECUTABLE_ALLOCATOR'] --elif target_machine.system() == 'netbsd' -- # jit compilation fails with "no more memory" if wx allocations are allowed. -- libpcre2_c_args += ['-DSLJIT_PROT_EXECUTABLE_ALLOCATOR'] --endif - - pcre2_includes = [ - include_directories('.'), diff --git a/pkgs/development/tools/analysis/rizin/default.nix b/pkgs/development/tools/analysis/rizin/default.nix index c865ac53b0b8..a5df7ec02e9e 100644 --- a/pkgs/development/tools/analysis/rizin/default.nix +++ b/pkgs/development/tools/analysis/rizin/default.nix @@ -29,11 +29,11 @@ let rizin = stdenv.mkDerivation rec { pname = "rizin"; - version = "0.7.4"; + version = "0.8.1"; src = fetchurl { url = "https://github.com/rizinorg/rizin/releases/download/v${version}/rizin-src-v${version}.tar.xz"; - hash = "sha256-9xGJEOXchDw4uqPgCzDsAZoc3VwTK6K8Fs8MdJdjEgE="; + hash = "sha256-7yseZSXX3DasQ1JblWdJwcyge/F8H+2LZkAtggEKTsI="; }; mesonFlags = [ @@ -60,10 +60,6 @@ let # caching it. This patch replaces the entire logic to only look at # the env var NIX_RZ_PREFIX ./librz-wrapper-support.patch - - ./0001-fix-compilation-with-clang.patch - # Can be dropped when upstream fixes this: https://github.com/NixOS/nixpkgs/issues/300056 - ./0002-disable-pcre2-jit.patch ]; nativeBuildInputs = [ From 08a3f21a5f6265dbfcc9f71c663a460acf49a65c Mon Sep 17 00:00:00 2001 From: Amadej Kastelic Date: Sat, 17 May 2025 22:15:12 +0200 Subject: [PATCH 2/4] cutter: 2.3.4 -> 2.4.1 https://github.com/rizinorg/cutter/releases/tag/v2.4.1 --- pkgs/development/tools/analysis/rizin/cutter.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pkgs/development/tools/analysis/rizin/cutter.nix b/pkgs/development/tools/analysis/rizin/cutter.nix index 213894fa62e3..86d7c2dd36d4 100644 --- a/pkgs/development/tools/analysis/rizin/cutter.nix +++ b/pkgs/development/tools/analysis/rizin/cutter.nix @@ -25,24 +25,16 @@ let cutter = stdenv.mkDerivation rec { pname = "cutter"; - version = "2.3.4"; + version = "2.4.1"; src = fetchFromGitHub { owner = "rizinorg"; repo = "cutter"; rev = "v${version}"; - hash = "sha256-TSEi1mXVvvaGo4koo3EnN/veXPUHF747g+gifnl4IDQ="; + hash = "sha256-fNOznaFzWJ4Dve9U1+E4xPaznnyxae2jHNaBCdJzDyQ="; fetchSubmodules = true; }; - patches = [ - # https://github.com/rizinorg/cutter/issues/3384 - (fetchpatch { - url = "https://gitlab.archlinux.org/archlinux/packaging/packages/rz-cutter/-/raw/f736a5709c0b4711760f8242fa77eeaf178c0302/pyside-6.8.patch"; - hash = "sha256-k1Bn6tCNkbE9r5QLfJTBg1zZZU9R7fG1tyfPgSJyQgg="; - }) - ]; - nativeBuildInputs = [ cmake pkg-config From 685bceab6439413301104b495d9c6ec1317ec02b Mon Sep 17 00:00:00 2001 From: Amadej Kastelic Date: Sat, 17 May 2025 22:15:52 +0200 Subject: [PATCH 3/4] cutterPlugins.jsdec: 0.7.0 -> 0.8.0 --- pkgs/development/tools/analysis/rizin/jsdec.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/development/tools/analysis/rizin/jsdec.nix b/pkgs/development/tools/analysis/rizin/jsdec.nix index ba63e8f0209e..a6dbec600756 100644 --- a/pkgs/development/tools/analysis/rizin/jsdec.nix +++ b/pkgs/development/tools/analysis/rizin/jsdec.nix @@ -10,22 +10,24 @@ }: let + version = "0.8.0"; + libquickjs = fetchFromGitHub { - owner = "frida"; + owner = "quickjs-ng"; repo = "quickjs"; - rev = "c81f05c9859cea5f83a80057416a0c7affe9b876"; - hash = "sha256-nAws0ae9kAwvCFcw/yR7XRMwU8EbHoq7kp7iBFpZEZc="; + tag = "v${version}"; + hash = "sha256-o0Cpy+20EqNdNENaYlasJcKIGU7W4RYBcTMsQwFTUNc="; }; in stdenv.mkDerivation (finalAttrs: { pname = "jsdec"; - version = "0.7.0"; + version = version; src = fetchFromGitHub { owner = "rizinorg"; repo = "jsdec"; - rev = "v${finalAttrs.version}"; - hash = "sha256-UuFA0YKH+0n4Ec3CTiSUFlKXMY4k+tooaEFJYrj6Law="; + rev = "v${version}"; + hash = "sha256-Xc8FMKSGdjrp288u49R6YC0xiynwHeoZe2P/UqnfsFU="; }; postUnpack = '' From c239380cc042ba77c1ec89e056a2c419191987ae Mon Sep 17 00:00:00 2001 From: Amadej Kastelic Date: Sat, 17 May 2025 22:16:24 +0200 Subject: [PATCH 4/4] cutterPlugins.rz-ghidra: 0.7.0 -> 0.8.0 --- pkgs/development/tools/analysis/rizin/rz-ghidra.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/rizin/rz-ghidra.nix b/pkgs/development/tools/analysis/rizin/rz-ghidra.nix index db0a053879b3..d0808fb07cc8 100644 --- a/pkgs/development/tools/analysis/rizin/rz-ghidra.nix +++ b/pkgs/development/tools/analysis/rizin/rz-ghidra.nix @@ -17,13 +17,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rz-ghidra"; - version = "0.7.0"; + version = "0.8.0"; src = fetchFromGitHub { owner = "rizinorg"; repo = "rz-ghidra"; rev = "v${finalAttrs.version}"; - hash = "sha256-W9VcKrDAh7GNRbE4eyWbtHlsYLmrjBBgVvWNyMUhlDk="; + hash = "sha256-uI0EnuHAuyrXYKDijh5Tg/WcQ/5yyZnW3d5MMHZxnqA="; fetchSubmodules = true; };