diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/analysis/rizin/rz-ghidra.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/analysis/rizin/rz-ghidra.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/analysis/rizin/rz-ghidra.nix b/nixpkgs/pkgs/development/tools/analysis/rizin/rz-ghidra.nix new file mode 100644 index 000000000000..d349a33af814 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/analysis/rizin/rz-ghidra.nix @@ -0,0 +1,62 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, cmake +# buildInputs +, rizin +, openssl +, pugixml +# optional buildInputs +, enableCutterPlugin ? true +, cutter +, qtbase +, qtsvg +}: + +stdenv.mkDerivation rec { + pname = "rz-ghidra"; + version = "0.6.0"; + + src = fetchFromGitHub { + owner = "rizinorg"; + repo = "rz-ghidra"; + rev = "v${version}"; + hash = "sha256-tQAurouRr6fP1tbIkfd0a9UfeYcwiU1BpjOTcooXkT0="; + fetchSubmodules = true; + }; + + patches = [ + (fetchpatch { + url = "https://github.com/rizinorg/rz-ghidra/pull/327/commits/eba20e2c743ed3dfc5d1be090a5018f7267baa49.patch"; + hash = "sha256-aoXFClXZBcOnHl+6lLYrnui7sRb3cRJQhQfNDLxHtcs="; + }) + ]; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ + openssl + pugixml + rizin + ] ++ lib.optionals enableCutterPlugin [ + cutter + 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; { + description = "Deep ghidra decompiler and sleigh disassembler integration for rizin"; + homepage = src.meta.homepage; + license = licenses.lgpl3; + maintainers = with maintainers; [ chayleaf ]; + }; +} |