depot/third_party/nixpkgs/pkgs/development/tools/analysis/rizin/rz-ghidra.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

60 lines
1.3 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
# buildInputs
, rizin
, openssl
, pugixml
# optional buildInputs
, enableCutterPlugin ? true
, cutter
, qt5compat
, qtbase
, qtsvg
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rz-ghidra";
version = "0.7.0";
src = fetchFromGitHub {
owner = "rizinorg";
repo = "rz-ghidra";
rev = "v${finalAttrs.version}";
hash = "sha256-W9VcKrDAh7GNRbE4eyWbtHlsYLmrjBBgVvWNyMUhlDk=";
fetchSubmodules = true;
};
nativeBuildInputs = [ cmake ];
buildInputs = [
openssl
pugixml
rizin
] ++ lib.optionals enableCutterPlugin [
cutter
qt5compat
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; {
# errors out with undefined symbols from Cutter
broken = enableCutterPlugin && stdenv.isDarwin;
description = "Deep ghidra decompiler and sleigh disassembler integration for rizin";
homepage = finalAttrs.src.meta.homepage;
changelog = "${finalAttrs.src.meta.homepage}/releases/tag/${finalAttrs.src.rev}";
license = licenses.lgpl3;
maintainers = with maintainers; [ chayleaf ];
inherit (rizin.meta) platforms;
};
})