2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
# buildInputs
|
|
|
|
, rizin
|
|
|
|
, openssl
|
|
|
|
, pugixml
|
|
|
|
# optional buildInputs
|
|
|
|
, enableCutterPlugin ? true
|
|
|
|
, cutter
|
2024-01-02 11:29:13 +00:00
|
|
|
, qt5compat
|
2023-08-22 20:05:09 +00:00
|
|
|
, qtbase
|
|
|
|
, qtsvg
|
|
|
|
}:
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-08-22 20:05:09 +00:00
|
|
|
pname = "rz-ghidra";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.7.0";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rizinorg";
|
|
|
|
repo = "rz-ghidra";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-W9VcKrDAh7GNRbE4eyWbtHlsYLmrjBBgVvWNyMUhlDk=";
|
2023-08-22 20:05:09 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
pugixml
|
|
|
|
rizin
|
|
|
|
] ++ lib.optionals enableCutterPlugin [
|
|
|
|
cutter
|
2024-01-02 11:29:13 +00:00
|
|
|
qt5compat
|
2023-08-22 20:05:09 +00:00
|
|
|
qtbase
|
|
|
|
qtsvg
|
|
|
|
];
|
|
|
|
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_SYSTEM_PUGIXML=ON"
|
|
|
|
] ++ lib.optionals enableCutterPlugin [
|
|
|
|
"-DBUILD_CUTTER_PLUGIN=ON"
|
|
|
|
"-DCUTTER_INSTALL_PLUGDIR=share/rizin/cutter/plugins/native"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-01-02 11:29:13 +00:00
|
|
|
# errors out with undefined symbols from Cutter
|
|
|
|
broken = enableCutterPlugin && stdenv.isDarwin;
|
2023-08-22 20:05:09 +00:00
|
|
|
description = "Deep ghidra decompiler and sleigh disassembler integration for rizin";
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = finalAttrs.src.meta.homepage;
|
|
|
|
changelog = "${finalAttrs.src.meta.homepage}/releases/tag/${finalAttrs.src.rev}";
|
2023-08-22 20:05:09 +00:00
|
|
|
license = licenses.lgpl3;
|
|
|
|
maintainers = with maintainers; [ chayleaf ];
|
2024-01-02 11:29:13 +00:00
|
|
|
inherit (rizin.meta) platforms;
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
})
|