Skip to content

Commit

Permalink
Merge pull request #56959 from ck3d/ghidra
Browse files Browse the repository at this point in the history
initial ghidra-9.0
  • Loading branch information
Mic92 authored Mar 14, 2019
2 parents 8c0abe7 + 2385d15 commit 8f9e283
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
48 changes: 48 additions & 0 deletions pkgs/tools/security/ghidra/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{ stdenv, fetchurl, unzip, lib, makeWrapper, autoPatchelfHook
, 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
autoPatchelfHook
unzip
];

buildInputs = [
stdenv.cc.cc.lib
pam
];

dontStrip = true;

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 ];
};

}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,8 @@ in

gh-ost = callPackage ../tools/misc/gh-ost { };

ghidra-bin = callPackage ../tools/security/ghidra { };

gif-for-cli = callPackage ../tools/misc/gif-for-cli { };

gist = callPackage ../tools/text/gist { };
Expand Down

0 comments on commit 8f9e283

Please sign in to comment.