nixpkgs/pkgs/development/tools/misc/pwndbg/default.nix

63 lines
1.2 KiB
Nix
Raw Normal View History

2018-12-01 12:01:45 +01:00
{ stdenv
, fetchFromGitHub
, makeWrapper
, gdb
, future
, isort
, psutil
, pycparser
, pyelftools
, python-ptrace
, ROPGadget
, six
, unicorn
, pygments
, }:
2018-04-06 09:21:43 +02:00
stdenv.mkDerivation rec {
2018-08-02 00:33:33 +02:00
name = "pwndbg-${version}";
version = "2018.07.29";
2018-04-06 09:21:43 +02:00
src = fetchFromGitHub {
owner = "pwndbg";
repo = "pwndbg";
2018-08-02 00:33:33 +02:00
rev = version;
sha256 = "1illk1smknaaa0ck8mwvig15c8al5w7fdp42a748xvm8wvxqxdsc";
2018-04-06 09:21:43 +02:00
};
nativeBuildInputs = [ makeWrapper ];
2018-12-01 12:01:45 +01:00
propagatedBuildInputs = [
2018-04-06 09:21:43 +02:00
future
isort
psutil
pycparser
pyelftools
python-ptrace
ROPGadget
six
unicorn
pygments
];
installPhase = ''
mkdir -p $out/share/pwndbg
cp -r *.py pwndbg $out/share/pwndbg
makeWrapper ${gdb}/bin/gdb $out/bin/pwndbg \
--add-flags "-q -x $out/share/pwndbg/gdbinit.py"
'';
preFixup = ''
2018-04-06 12:25:15 +02:00
sed -i "/import sys/a import sys; sys.path[0:0] = '$PYTHONPATH'.split(':')" \
2018-04-06 09:21:43 +02:00
$out/share/pwndbg/gdbinit.py
'';
meta = with stdenv.lib; {
description = "Exploit Development and Reverse Engineering with GDB Made Easy";
homepage = http://pwndbg.com;
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ mic92 ];
};
}