diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/analysis/rizin')
6 files changed, 75 insertions, 48 deletions
diff --git a/nixpkgs/pkgs/development/tools/analysis/rizin/0001-fix-compilation-with-clang.patch b/nixpkgs/pkgs/development/tools/analysis/rizin/0001-fix-compilation-with-clang.patch new file mode 100644 index 000000000000..adb1eebb3e17 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/analysis/rizin/0001-fix-compilation-with-clang.patch @@ -0,0 +1,30 @@ +From 93acbc13cf271faf6025e96991eb3ab65062f90f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io> +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 <joerg@thalheim.io> +--- + 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/nixpkgs/pkgs/development/tools/analysis/rizin/cutter.nix b/nixpkgs/pkgs/development/tools/analysis/rizin/cutter.nix index 480f20f04f49..44954c62a3c2 100644 --- a/nixpkgs/pkgs/development/tools/analysis/rizin/cutter.nix +++ b/nixpkgs/pkgs/development/tools/analysis/rizin/cutter.nix @@ -1,6 +1,5 @@ { lib , fetchFromGitHub -, fetchpatch , stdenv # for passthru.plugins , pkgs @@ -23,25 +22,16 @@ let cutter = stdenv.mkDerivation rec { pname = "cutter"; - version = "2.3.2"; + version = "2.3.4"; src = fetchFromGitHub { owner = "rizinorg"; repo = "cutter"; rev = "v${version}"; - hash = "sha256-88yIqFYIv7o6aC2YSJwWJ46fZJBnOmifv+SirsfS4tw="; + hash = "sha256-TSEi1mXVvvaGo4koo3EnN/veXPUHF747g+gifnl4IDQ="; fetchSubmodules = true; }; - patches = [ - # tracking: https://github.com/rizinorg/cutter/pull/3268 - (fetchpatch { - name = "cutter-simplify-python-binding-include-handling.patch"; - url = "https://github.com/rizinorg/cutter/compare/7256fbb00e92ab12a24d14a92364db482ed295cb..ca5949d9d7c907185cf3d062d9fa71c34c5960d4.diff"; - hash = "sha256-bqV2FTA8lMNpHBDXdenNx+1cLYa7MH47XKo1YatmLV4="; - }) - ]; - nativeBuildInputs = [ cmake pkg-config diff --git a/nixpkgs/pkgs/development/tools/analysis/rizin/default.nix b/nixpkgs/pkgs/development/tools/analysis/rizin/default.nix index 9f8524e68995..e298b1690405 100644 --- a/nixpkgs/pkgs/development/tools/analysis/rizin/default.nix +++ b/nixpkgs/pkgs/development/tools/analysis/rizin/default.nix @@ -1,13 +1,13 @@ { lib , pkgs # for passthru.plugins , stdenv -, fetchpatch , fetchurl , pkg-config , libusb-compat-0_1 , readline , libewf , perl +, pcre2 , zlib , openssl , file @@ -22,15 +22,16 @@ , ninja , capstone , tree-sitter +, zstd }: let rizin = stdenv.mkDerivation rec { pname = "rizin"; - version = "0.6.3"; + version = "0.7.2"; src = fetchurl { url = "https://github.com/rizinorg/rizin/releases/download/v${version}/rizin-src-v${version}.tar.xz"; - hash = "sha256-lfZMarnm2qnp+lY0OY649s206/LoFNouTLlp0x9FCcI="; + hash = "sha256-/P8/tFrit14/YEvHoIB24yLm4U3veQmBhjeAZcyzWCo="; }; mesonFlags = [ @@ -39,11 +40,13 @@ let rizin = stdenv.mkDerivation rec { "-Duse_sys_libzip=enabled" "-Duse_sys_zlib=enabled" "-Duse_sys_lz4=enabled" + "-Duse_sys_libzstd=enabled" "-Duse_sys_lzma=enabled" "-Duse_sys_xxhash=enabled" "-Duse_sys_openssl=enabled" "-Duse_sys_libmspack=enabled" "-Duse_sys_tree_sitter=enabled" + "-Duse_sys_pcre2=enabled" # this is needed for wrapping (adding plugins) to work "-Dportable=true" ]; @@ -55,12 +58,8 @@ let rizin = stdenv.mkDerivation rec { # caching it. This patch replaces the entire logic to only look at # the env var NIX_RZ_PREFIX ./librz-wrapper-support.patch - # Fix tree-sitter 0.20.9 build failure: https://github.com/rizinorg/rizin/pull/4165 - (fetchpatch { - name = "tree-sitter-0.20.9.patch"; - url = "https://github.com/rizinorg/rizin/commit/1bb08712dbc9e062bb439a65dcebeb4221ded699.patch"; - hash = "sha256-mE0eQAFhyxX5bwrz+S1IVl6HNV9ITQ+tRRvGLLif5VI="; - }) + + ./0001-fix-compilation-with-clang.patch ]; @@ -96,6 +95,7 @@ let rizin = stdenv.mkDerivation rec { readline libusb-compat-0_1 libewf + pcre2 perl zlib lz4 @@ -104,6 +104,7 @@ let rizin = stdenv.mkDerivation rec { tree-sitter xxHash xz + zstd ]; postPatch = '' diff --git a/nixpkgs/pkgs/development/tools/analysis/rizin/jsdec.nix b/nixpkgs/pkgs/development/tools/analysis/rizin/jsdec.nix index df291d169eb5..a1c0bc7ed67f 100644 --- a/nixpkgs/pkgs/development/tools/analysis/rizin/jsdec.nix +++ b/nixpkgs/pkgs/development/tools/analysis/rizin/jsdec.nix @@ -8,28 +8,41 @@ , openssl }: -stdenv.mkDerivation rec { +let + libquickjs = fetchFromGitHub { + owner = "frida"; + repo = "quickjs"; + rev = "c81f05c9859cea5f83a80057416a0c7affe9b876"; + hash = "sha256-nAws0ae9kAwvCFcw/yR7XRMwU8EbHoq7kp7iBFpZEZc="; + }; +in +stdenv.mkDerivation (finalAttrs: { pname = "jsdec"; - version = "0.6.0"; + version = "0.7.0"; src = fetchFromGitHub { owner = "rizinorg"; repo = "jsdec"; - rev = "v${version}"; - hash = "sha256-iVaxxPBIJRhZrmejAOL/Fb4k66mGsZOBs7UikgMj5WA="; + rev = "v${finalAttrs.version}"; + hash = "sha256-UuFA0YKH+0n4Ec3CTiSUFlKXMY4k+tooaEFJYrj6Law="; }; - nativeBuildInputs = [ meson ninja pkg-config ]; - preConfigure = '' - cd p + postUnpack = '' + cp -r --no-preserve=mode ${libquickjs} $sourceRoot/subprojects/libquickjs + ''; + + postPatch = '' + cp subprojects/packagefiles/libquickjs/* subprojects/libquickjs ''; - mesonFlags = [ "-Djsc_folder=.." ]; + + nativeBuildInputs = [ meson ninja pkg-config ]; buildInputs = [ openssl rizin ]; meta = with lib; { description = "Simple decompiler for Rizin"; - homepage = src.meta.homepage; + homepage = finalAttrs.src.meta.homepage; + changelog = "${finalAttrs.src.meta.homepage}/releases/tag/${finalAttrs.src.rev}"; license = with licenses; [ asl20 bsd3 mit ]; maintainers = with maintainers; [ chayleaf ]; }; -} +}) diff --git a/nixpkgs/pkgs/development/tools/analysis/rizin/rz-ghidra.nix b/nixpkgs/pkgs/development/tools/analysis/rizin/rz-ghidra.nix index d2cb95f2d962..fcc014f9944d 100644 --- a/nixpkgs/pkgs/development/tools/analysis/rizin/rz-ghidra.nix +++ b/nixpkgs/pkgs/development/tools/analysis/rizin/rz-ghidra.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch , cmake # buildInputs , rizin @@ -15,25 +14,18 @@ , qtsvg }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "rz-ghidra"; - version = "0.6.0"; + version = "0.7.0"; src = fetchFromGitHub { owner = "rizinorg"; repo = "rz-ghidra"; - rev = "v${version}"; - hash = "sha256-tQAurouRr6fP1tbIkfd0a9UfeYcwiU1BpjOTcooXkT0="; + rev = "v${finalAttrs.version}"; + hash = "sha256-W9VcKrDAh7GNRbE4eyWbtHlsYLmrjBBgVvWNyMUhlDk="; fetchSubmodules = true; }; - patches = [ - (fetchpatch { - url = "https://github.com/rizinorg/rz-ghidra/pull/327/commits/eba20e2c743ed3dfc5d1be090a5018f7267baa49.patch"; - hash = "sha256-aoXFClXZBcOnHl+6lLYrnui7sRb3cRJQhQfNDLxHtcs="; - }) - ]; - nativeBuildInputs = [ cmake ]; buildInputs = [ openssl @@ -59,9 +51,10 @@ stdenv.mkDerivation rec { # errors out with undefined symbols from Cutter broken = enableCutterPlugin && stdenv.isDarwin; description = "Deep ghidra decompiler and sleigh disassembler integration for rizin"; - homepage = src.meta.homepage; + homepage = finalAttrs.src.meta.homepage; + changelog = "${finalAttrs.src.meta.homepage}/releases/tag/${finalAttrs.src.rev}"; license = licenses.lgpl3; maintainers = with maintainers; [ chayleaf ]; inherit (rizin.meta) platforms; }; -} +}) diff --git a/nixpkgs/pkgs/development/tools/analysis/rizin/sigdb.nix b/nixpkgs/pkgs/development/tools/analysis/rizin/sigdb.nix index 2c4bdaebbaba..40d0fe62f259 100644 --- a/nixpkgs/pkgs/development/tools/analysis/rizin/sigdb.nix +++ b/nixpkgs/pkgs/development/tools/analysis/rizin/sigdb.nix @@ -5,15 +5,15 @@ stdenvNoCC.mkDerivation rec { pname = "rizin-sigdb"; - version = "unstable-2023-02-13"; + version = "unstable-2023-08-23"; src = fetchFromGitHub { owner = "rizinorg"; # sigdb-source: source files (.pat and etc), around 2.5gb total # sigdb: built and deflated .sig files, around 50mb total repo = "sigdb"; - rev = "829baf835e3515923266898fd597f7f75046ebd2"; - hash = "sha256-zvGna2CEsDctc9P7hWTaz7kdtxAtPsXHNWOrRQ9ocdc="; + rev = "4addbed50cd3b50eeef5a41d72533d079ebbfbf8"; + hash = "sha256-Fy92MTuLswEgQ/XEUExqdU1Z4a5MP2Ahzi/gGxd5BtA="; }; buildPhase = '' |