initial ghidra-9.0
I tested basic usage of tool CodeBrowser. The tool VersionTracking raises an error.
This commit is contained in:
parent
34aa254f9e
commit
631faad148
54
pkgs/tools/security/ghidra/default.nix
Normal file
54
pkgs/tools/security/ghidra/default.nix
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{ stdenv, fetchurl, unzip, lib, makeWrapper, patchelf
|
||||||
|
, openjdk11, pam
|
||||||
|
}: let
|
||||||
|
|
||||||
|
pkg_path = "$out/lib/ghidra";
|
||||||
|
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
|
||||||
|
name = "ghidra-9.0";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = https://ghidra-sre.org/ghidra_9.0_PUBLIC_20190228.zip;
|
||||||
|
sha256 = "3b65d29024b9decdbb1148b12fe87bcb7f3a6a56ff38475f5dc9dd1cfc7fd6b2";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
makeWrapper
|
||||||
|
patchelf
|
||||||
|
unzip
|
||||||
|
];
|
||||||
|
|
||||||
|
dontStrip = true;
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
for f in Ghidra/Features/Decompiler/os/linux64/* GPL/DemanglerGnu/os/linux64/*; do
|
||||||
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||||
|
--set-rpath "${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" "$f"
|
||||||
|
done
|
||||||
|
|
||||||
|
for f in Ghidra/Features/GhidraServer/os/linux64/*; do
|
||||||
|
patchelf --set-rpath "${stdenv.cc.libc}/lib:${pam}/lib" "$f"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p "${pkg_path}"
|
||||||
|
cp -a * "${pkg_path}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
mkdir -p "$out/bin"
|
||||||
|
makeWrapper "${pkg_path}/ghidraRun" "$out/bin/ghidra" \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ openjdk11 ]}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A software reverse engineering (SRE) suite of tools developed by NSA's Research Directorate in support of the Cybersecurity mission";
|
||||||
|
homepage = "https://ghidra-sre.org/";
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = [ maintainers.ck3d ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -1447,6 +1447,8 @@ in
|
|||||||
|
|
||||||
gh-ost = callPackage ../tools/misc/gh-ost { };
|
gh-ost = callPackage ../tools/misc/gh-ost { };
|
||||||
|
|
||||||
|
ghidra-bin = callPackage ../tools/security/ghidra { };
|
||||||
|
|
||||||
gif-for-cli = callPackage ../tools/misc/gif-for-cli { };
|
gif-for-cli = callPackage ../tools/misc/gif-for-cli { };
|
||||||
|
|
||||||
gist = callPackage ../tools/text/gist { };
|
gist = callPackage ../tools/text/gist { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user