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