Merge pull request #268874 from chayleaf/cutter
cutter: fix build; switch from qt5 to qt6
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19853,7 +19853,7 @@ with pkgs;
|
||||
|
||||
rizinPlugins = recurseIntoAttrs rizin.plugins;
|
||||
|
||||
cutter = libsForQt5.callPackage ../development/tools/analysis/rizin/cutter.nix { };
|
||||
cutter = qt6.callPackage ../development/tools/analysis/rizin/cutter.nix { };
|
||||
|
||||
cutterPlugins = recurseIntoAttrs cutter.plugins;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user