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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.1 KiB
Nix
Raw Normal View History

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