diff options
author | Lily Foster <lily@lily.flowers> | 2023-11-29 22:25:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-29 22:25:21 -0500 |
commit | e8b8b40e007ec14c9c759bf3a6090d3af7dbc097 (patch) | |
tree | fa1f0f99e20c9f033bed6bcc8d778eca5c7cb754 /pkgs/development/tools/analysis | |
parent | 72b7b77271e964a8329ad92d44fcf47454ffd9bf (diff) | |
parent | fd2031b77c571d7d92839b76351fb6489f07f324 (diff) |
Merge pull request #268874 from chayleaf/cutter
cutter: fix build; switch from qt5 to qt6
Diffstat (limited to 'pkgs/development/tools/analysis')
-rw-r--r-- | pkgs/development/tools/analysis/rizin/cutter.nix | 55 | ||||
-rw-r--r-- | pkgs/development/tools/analysis/rizin/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/tools/analysis/rizin/rz-ghidra.nix | 5 |
3 files changed, 52 insertions, 10 deletions
diff --git a/pkgs/development/tools/analysis/rizin/cutter.nix b/pkgs/development/tools/analysis/rizin/cutter.nix index f274bff6cca7a..f20f77eca7a22 100644 --- a/pkgs/development/tools/analysis/rizin/cutter.nix +++ b/pkgs/development/tools/analysis/rizin/cutter.nix @@ -1,18 +1,26 @@ -{ fetchFromGitHub, lib, mkDerivation +{ lib +, fetchFromGitHub +, fetchpatch +, stdenv # for passthru.plugins , pkgs # nativeBuildInputs -, qmake, pkg-config, cmake +, cmake +, pkg-config +, wrapQtAppsHook # Qt -, qtbase, qtsvg, qtwebengine, qttools +, qt5compat +, qtbase +, qtsvg +, qttools +, qtwebengine # buildInputs , graphviz -, rizin , python3 -, wrapQtAppsHook +, rizin }: -let cutter = mkDerivation rec { +let cutter = stdenv.mkDerivation rec { pname = "cutter"; version = "2.3.2"; @@ -24,15 +32,43 @@ let cutter = mkDerivation rec { fetchSubmodules = true; }; - nativeBuildInputs = [ cmake qmake pkg-config python3 wrapQtAppsHook ]; - propagatedBuildInputs = [ python3.pkgs.pyside2 ]; - buildInputs = [ graphviz qtbase qttools qtsvg qtwebengine rizin python3 ]; + 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 + python3 + wrapQtAppsHook + ]; + + propagatedBuildInputs = [ + python3.pkgs.pyside6 + ]; + + buildInputs = [ + graphviz + python3 + qt5compat + qtbase + qtsvg + qttools + qtwebengine + rizin + ]; cmakeFlags = [ "-DCUTTER_USE_BUNDLED_RIZIN=OFF" "-DCUTTER_ENABLE_PYTHON=ON" "-DCUTTER_ENABLE_PYTHON_BINDINGS=ON" "-DCUTTER_ENABLE_GRAPHVIZ=ON" + "-DCUTTER_QT6=ON" ]; preBuild = '' @@ -59,5 +95,6 @@ let cutter = mkDerivation rec { license = licenses.gpl3; mainProgram = "cutter"; maintainers = with maintainers; [ mic92 dtzWill ]; + inherit (rizin.meta) platforms; }; }; in cutter diff --git a/pkgs/development/tools/analysis/rizin/default.nix b/pkgs/development/tools/analysis/rizin/default.nix index d4bd1e84b112f..3112e438da051 100644 --- a/pkgs/development/tools/analysis/rizin/default.nix +++ b/pkgs/development/tools/analysis/rizin/default.nix @@ -109,7 +109,7 @@ let rizin = stdenv.mkDerivation rec { jsdec = pkgs.callPackage ./jsdec.nix { inherit rizin openssl; }; - rz-ghidra = pkgs.libsForQt5.callPackage ./rz-ghidra.nix { + rz-ghidra = pkgs.qt6.callPackage ./rz-ghidra.nix { inherit rizin openssl; enableCutterPlugin = false; }; diff --git a/pkgs/development/tools/analysis/rizin/rz-ghidra.nix b/pkgs/development/tools/analysis/rizin/rz-ghidra.nix index d349a33af8147..d2cb95f2d9628 100644 --- a/pkgs/development/tools/analysis/rizin/rz-ghidra.nix +++ b/pkgs/development/tools/analysis/rizin/rz-ghidra.nix @@ -10,6 +10,7 @@ # optional buildInputs , enableCutterPlugin ? true , cutter +, qt5compat , qtbase , qtsvg }: @@ -40,6 +41,7 @@ stdenv.mkDerivation rec { rizin ] ++ lib.optionals enableCutterPlugin [ cutter + qt5compat qtbase qtsvg ]; @@ -54,9 +56,12 @@ stdenv.mkDerivation rec { ]; meta = with lib; { + # 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; license = licenses.lgpl3; maintainers = with maintainers; [ chayleaf ]; + inherit (rizin.meta) platforms; }; } |