28 debuggerName = lib.strings.getName debugger;
30 buildPythonPackage rec {
35 inherit pname version;
36 sha256 = "sha256-QgUuLYg3EOTh2gQekWdabXGftOXvLdJFyyhT2hEmkpA=";
40 # Upstream has set an upper bound on unicorn because of https://github.com/Gallopsled/pwntools/issues/1538,
41 # but since that is a niche use case and it requires extra work to get unicorn 1.0.2rc3 to work we relax
42 # the bound here. Check if this is still necessary when updating!
43 sed -i 's/unicorn>=1.0.2rc1,<1.0.2rc4/unicorn>=1.0.2rc1/' setup.py
45 # Upstream hardcoded the check for the command `gdb-multiarch`;
46 # Forcefully use the provided debugger, as `gdb` (hence `pwndbg`) is built with multiarch in `nixpkgs`.
47 sed -i 's/gdb-multiarch/${debuggerName}/' pwnlib/gdb.py
54 propagatedBuildInputs = [
75 doCheck = false; # no setuptools tests for the package
78 installShellCompletion --bash extra/bash_completion.d/shellcraft
81 postFixup = lib.optionalString (!stdenv.isDarwin) ''
83 makeWrapper "${debugger}/bin/${debuggerName}" "$out/bin/pwntools-gdb"
87 homepage = "http://pwntools.com";
88 description = "CTF framework and exploit development library";
89 license = licenses.mit;
90 maintainers = with maintainers; [ bennofs kristoff3r pamplemousse ];