blob: be73c36ca232876ca2ef760c59579a4d351f3f6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
{ pkgs }:
let
pyghidra = pkgs.python3Packages.buildPythonPackage {
pname = "pyghidra";
version = "2.2.1";
format = "wheel";
src = "${pkgs.ghidra}/lib/ghidra/Ghidra/Features/PyGhidra/pypkg/dist/pyghidra-2.2.1-py3-none-any.whl";
propagatedBuildInputs = with pkgs.python3Packages; [
jpype1
packaging
];
};
ghidraPython = pkgs.python3.withPackages (_: [ pyghidra ]);
in
pkgs.runCommand "ghidra" { buildInputs = [ pkgs.makeWrapper ]; } ''
mkdir -p $out/bin
makeWrapper ${ghidraPython}/bin/python3 $out/bin/ghidra \
--add-flags "-m pyghidra.ghidra_launch --install-dir ${pkgs.ghidra}/lib/ghidra -g ghidra.GhidraRun" \
--set JAVA_HOME ${pkgs.jdk21} \
--prefix PATH : ${pkgs.jdk21}/bin
''
|