ghidra: add wasm extension (#349645)

This commit is contained in:
Philip Taron 2024-11-25 07:43:12 -08:00 committed by GitHub
commit 091621ce37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 44 additions and 0 deletions

View File

@ -31,4 +31,5 @@ lib.makeScope newScope (self: {
sleighdevtools = self.callPackage ./extensions/sleighdevtools { inherit ghidra; };
wasm = self.callPackage ./extensions/wasm { inherit ghidra; };
})

View File

@ -0,0 +1,43 @@
{
lib,
fetchFromGitHub,
buildGhidraExtension,
ghidra,
ant,
}:
let
version = "2.3.1";
in
buildGhidraExtension {
pname = "wasm";
inherit version;
src = fetchFromGitHub {
owner = "nneonneo";
repo = "ghidra-wasm-plugin";
rev = "v${version}";
hash = "sha256-aoSMNzv+TgydiXM4CbvAyu/YsxmdZPvpkZkYEE3C+V4=";
};
nativeBuildInputs = [ ant ];
configurePhase = ''
runHook preConfigure
# this doesn't really compile, it compresses sinc into sla
pushd data
ant -f build.xml -Dghidra.install.dir=${ghidra}/lib/ghidra sleighCompile
popd
runHook postConfigure
'';
meta = {
description = "Ghidra Wasm plugin with disassembly and decompilation support";
homepage = "https://github.com/nneonneo/ghidra-wasm-plugin";
downloadPage = "https://github.com/nneonneo/ghidra-wasm-plugin/releases/tag/v${version}";
changelog = "https://github.com/nneonneo/ghidra-wasm-plugin/releases/tag/v${version}";
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.BonusPlay ];
};
}