32 debuggerName = lib.strings.getName debugger;
34 buildPythonPackage rec {
40 inherit pname version;
41 hash = "sha256-szInJftQMdwwll44VQc2CNmr900qv5enLGfUSq3843w=";
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
50 nativeBuildInputs = [ installShellFiles ];
52 build-system = [ setuptools ];
54 pythonRemoveDeps = [ "pip" ];
56 propagatedBuildInputs = [
79 doCheck = false; # no setuptools tests for the package
82 installShellCompletion --bash extra/bash_completion.d/shellcraft
85 postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
87 makeWrapper "${debugger}/bin/${debuggerName}" "$out/bin/pwntools-gdb"
90 pythonImportsCheck = [ "pwn" ];
93 description = "CTF framework and exploit development library";
94 homepage = "https://pwntools.com";
95 changelog = "https://github.com/Gallopsled/pwntools/releases/tag/${version}";
96 license = licenses.mit;
97 maintainers = with maintainers; [