about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/analysis/rizin/cutter.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/analysis/rizin/cutter.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/analysis/rizin/cutter.nix29
1 files changed, 24 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/tools/analysis/rizin/cutter.nix b/nixpkgs/pkgs/development/tools/analysis/rizin/cutter.nix
index dd5f43b9d7a4..ab4d1289b924 100644
--- a/nixpkgs/pkgs/development/tools/analysis/rizin/cutter.nix
+++ b/nixpkgs/pkgs/development/tools/analysis/rizin/cutter.nix
@@ -1,44 +1,63 @@
 { fetchFromGitHub, lib, mkDerivation
+# for passthru.plugins
+, pkgs
 # nativeBuildInputs
 , qmake, pkg-config, cmake
 # Qt
 , qtbase, qtsvg, qtwebengine, qttools
 # buildInputs
+, graphviz
 , rizin
 , python3
 , wrapQtAppsHook
 }:
 
-mkDerivation rec {
+let cutter = mkDerivation rec {
   pname = "cutter";
-  version = "2.2.1";
+  version = "2.3.0";
 
   src = fetchFromGitHub {
     owner = "rizinorg";
     repo = "cutter";
     rev = "v${version}";
-    hash = "sha256-rzMLPkL382webds7cnfanHy9BsV+8ARkl6aES5ckmO4=";
+    hash = "sha256-oQ3sLIGKMEw3k27aSFcrJqo0TgGkkBNdzl6GSoOIYak=";
     fetchSubmodules = true;
   };
 
   nativeBuildInputs = [ cmake qmake pkg-config python3 wrapQtAppsHook ];
   propagatedBuildInputs = [ python3.pkgs.pyside2 ];
-  buildInputs = [ qtbase qttools qtsvg qtwebengine rizin python3 ];
+  buildInputs = [ graphviz qtbase qttools qtsvg qtwebengine rizin python3 ];
 
   cmakeFlags = [
     "-DCUTTER_USE_BUNDLED_RIZIN=OFF"
     "-DCUTTER_ENABLE_PYTHON=ON"
     "-DCUTTER_ENABLE_PYTHON_BINDINGS=ON"
+    "-DCUTTER_ENABLE_GRAPHVIZ=ON"
   ];
 
   preBuild = ''
     qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH")
   '';
 
+  passthru = rec {
+    plugins = rizin.plugins // {
+      rz-ghidra = rizin.plugins.rz-ghidra.override {
+        inherit cutter qtbase qtsvg;
+        enableCutterPlugin = true;
+      };
+    };
+    withPlugins = filter: pkgs.callPackage ./wrapper.nix {
+      inherit rizin cutter;
+      isCutter = true;
+      plugins = filter plugins;
+    };
+  };
+
   meta = with lib; {
     description = "Free and Open Source Reverse Engineering Platform powered by rizin";
     homepage = src.meta.homepage;
     license = licenses.gpl3;
+    mainProgram = "cutter";
     maintainers = with maintainers; [ mic92 dtzWill ];
   };
-}
+}; in cutter