Skip to content

Commit

Permalink
ghidra: add wasm extension
Browse files Browse the repository at this point in the history
  • Loading branch information
BonusPlay committed Oct 18, 2024
1 parent 6b6a7fc commit fb6d655
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/tools/security/ghidra/extensions.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ lib.makeScope newScope (self: {

sleighdevtools = self.callPackage ./extensions/sleighdevtools { inherit ghidra; };

wasm = self.callPackage ./extensions/wasm { inherit ghidra; };

})
41 changes: 41 additions & 0 deletions pkgs/tools/security/ghidra/extensions/wasm/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
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=";
};

# compile sleigh
configurePhase = ''
runHook preConfigure
pushd data
${ant}/bin/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 ];
};
}

0 comments on commit fb6d655

Please sign in to comment.