3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/misc/pwndbg/default.nix

53 lines
1.1 KiB
Nix
Raw Normal View History

2018-12-01 11:01:45 +00:00
{ stdenv
, python3
2018-12-01 11:01:45 +00:00
, fetchFromGitHub
, makeWrapper
, gdb
}:
2018-04-06 08:21:43 +01:00
let
pythonPath = with python3.pkgs; makePythonPath [
2018-04-06 08:21:43 +01:00
future
isort
psutil
pycparser
pyelftools
python-ptrace
ROPGadget
six
unicorn
pygments
];
in stdenv.mkDerivation rec {
pname = "pwndbg";
version = "2019.01.25";
format = "other";
src = fetchFromGitHub {
owner = "pwndbg";
repo = "pwndbg";
rev = version;
sha256 = "0k7n6pcrj62ccag801yzf04a9mj9znghpkbnqwrzz0qn3rs42vgs";
};
nativeBuildInputs = [ makeWrapper ];
2018-04-06 08:21:43 +01:00
installPhase = ''
mkdir -p $out/share/pwndbg
cp -r *.py pwndbg $out/share/pwndbg
chmod +x $out/share/pwndbg/gdbinit.py
2018-04-06 08:21:43 +01:00
makeWrapper ${gdb}/bin/gdb $out/bin/pwndbg \
--add-flags "-q -x $out/share/pwndbg/gdbinit.py" \
--set NIX_PYTHONPATH ${pythonPath}
2018-04-06 08:21:43 +01:00
'';
meta = with stdenv.lib; {
description = "Exploit Development and Reverse Engineering with GDB Made Easy";
homepage = "https://github.com/pwndbg/pwndbg";
2018-04-06 08:21:43 +01:00
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ mic92 ];
};
}