2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
2023-08-22 20:05:09 +00:00
|
|
|
# for passthru.plugins
|
|
|
|
, pkgs
|
2021-04-08 16:26:57 +00:00
|
|
|
# nativeBuildInputs
|
2024-01-02 11:29:13 +00:00
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, wrapQtAppsHook
|
2021-04-08 16:26:57 +00:00
|
|
|
# Qt
|
2024-01-02 11:29:13 +00:00
|
|
|
, qt5compat
|
|
|
|
, qtbase
|
|
|
|
, qtwayland
|
|
|
|
, qtsvg
|
|
|
|
, qttools
|
|
|
|
, qtwebengine
|
2021-04-08 16:26:57 +00:00
|
|
|
# buildInputs
|
2023-08-10 07:59:29 +00:00
|
|
|
, graphviz
|
2021-04-08 16:26:57 +00:00
|
|
|
, python3
|
2024-01-02 11:29:13 +00:00
|
|
|
, rizin
|
2021-04-08 16:26:57 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
let cutter = stdenv.mkDerivation rec {
|
2021-04-08 16:26:57 +00:00
|
|
|
pname = "cutter";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.3.4";
|
2021-04-08 16:26:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rizinorg";
|
|
|
|
repo = "cutter";
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-TSEi1mXVvvaGo4koo3EnN/veXPUHF747g+gifnl4IDQ=";
|
2021-04-08 16:26:57 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
python3.pkgs.pyside6
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
graphviz
|
|
|
|
python3
|
|
|
|
qt5compat
|
|
|
|
qtbase
|
|
|
|
qtsvg
|
|
|
|
qttools
|
|
|
|
qtwebengine
|
|
|
|
rizin
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
qtwayland
|
|
|
|
];
|
2021-04-08 16:26:57 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCUTTER_USE_BUNDLED_RIZIN=OFF"
|
|
|
|
"-DCUTTER_ENABLE_PYTHON=ON"
|
|
|
|
"-DCUTTER_ENABLE_PYTHON_BINDINGS=ON"
|
2023-08-10 07:59:29 +00:00
|
|
|
"-DCUTTER_ENABLE_GRAPHVIZ=ON"
|
2024-01-02 11:29:13 +00:00
|
|
|
"-DCUTTER_QT6=ON"
|
2021-04-08 16:26:57 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH")
|
|
|
|
'';
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-04-08 16:26:57 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Free and Open Source Reverse Engineering Platform powered by rizin";
|
|
|
|
homepage = src.meta.homepage;
|
|
|
|
license = licenses.gpl3;
|
2023-08-22 20:05:09 +00:00
|
|
|
mainProgram = "cutter";
|
2021-04-08 16:26:57 +00:00
|
|
|
maintainers = with maintainers; [ mic92 dtzWill ];
|
2024-01-02 11:29:13 +00:00
|
|
|
inherit (rizin.meta) platforms;
|
2021-04-08 16:26:57 +00:00
|
|
|
};
|
2023-08-22 20:05:09 +00:00
|
|
|
}; in cutter
|