Skip to content

Commit 091621c

Browse files
authored
ghidra: add wasm extension (#349645)
2 parents 7c18ea3 + 4167057 commit 091621c

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

pkgs/tools/security/ghidra/extensions.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ lib.makeScope newScope (self: {
3131

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

34+
wasm = self.callPackage ./extensions/wasm { inherit ghidra; };
3435
})
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
lib,
3+
fetchFromGitHub,
4+
buildGhidraExtension,
5+
ghidra,
6+
ant,
7+
}:
8+
let
9+
version = "2.3.1";
10+
in
11+
buildGhidraExtension {
12+
pname = "wasm";
13+
inherit version;
14+
15+
src = fetchFromGitHub {
16+
owner = "nneonneo";
17+
repo = "ghidra-wasm-plugin";
18+
rev = "v${version}";
19+
hash = "sha256-aoSMNzv+TgydiXM4CbvAyu/YsxmdZPvpkZkYEE3C+V4=";
20+
};
21+
22+
nativeBuildInputs = [ ant ];
23+
24+
configurePhase = ''
25+
runHook preConfigure
26+
27+
# this doesn't really compile, it compresses sinc into sla
28+
pushd data
29+
ant -f build.xml -Dghidra.install.dir=${ghidra}/lib/ghidra sleighCompile
30+
popd
31+
32+
runHook postConfigure
33+
'';
34+
35+
meta = {
36+
description = "Ghidra Wasm plugin with disassembly and decompilation support";
37+
homepage = "https://github.com/nneonneo/ghidra-wasm-plugin";
38+
downloadPage = "https://github.com/nneonneo/ghidra-wasm-plugin/releases/tag/v${version}";
39+
changelog = "https://github.com/nneonneo/ghidra-wasm-plugin/releases/tag/v${version}";
40+
license = lib.licenses.gpl3;
41+
maintainers = [ lib.maintainers.BonusPlay ];
42+
};
43+
}

0 commit comments

Comments
 (0)