2019-03-13 21:03:40 +00:00
|
|
|
{ stdenv, fetchurl, unzip, lib, makeWrapper, autoPatchelfHook
|
2019-03-06 12:00:07 +00:00
|
|
|
, openjdk11, pam
|
|
|
|
}: let
|
|
|
|
|
|
|
|
pkg_path = "$out/lib/ghidra";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
|
2019-08-01 17:07:47 +01:00
|
|
|
name = "ghidra-9.0.4";
|
2019-03-06 12:00:07 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-01 17:07:47 +01:00
|
|
|
url = https://ghidra-sre.org/ghidra_9.0.4_PUBLIC_20190516.zip;
|
|
|
|
sha256 = "1gqqxk57hswwgr97qisqivcfgjdxjipfdshyh4r76dyrfpa0q3d5";
|
2019-03-06 12:00:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
2019-03-13 21:03:40 +00:00
|
|
|
autoPatchelfHook
|
2019-03-06 12:00:07 +00:00
|
|
|
unzip
|
|
|
|
];
|
|
|
|
|
2019-03-13 21:03:40 +00:00
|
|
|
buildInputs = [
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
pam
|
|
|
|
];
|
2019-03-06 12:00:07 +00:00
|
|
|
|
2019-03-13 21:03:40 +00:00
|
|
|
dontStrip = true;
|
2019-03-06 12:00:07 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|