- Nix 100%
| modules | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
pwndbg-nix
A small flake that packages pwndbg, the gdb plug-in for exploit dev and reverse engineering, and ships a home-manager module that wires it into gdb for you.
It re-exports the package straight from pwndbg's own upstream flake (so you track their builds, not a stale nixpkgs copy) and adds a thin programs.pwndbg module that installs it and writes ~/.gdbinit to autoload it.
Upstream ships pwndbg as a self-contained wrapped gdb, the package puts a pwndbg command on your PATH that IS gdb with pwndbg already loaded. You do not strictly need a ~/.gdbinit for that command. The module still writes one so that a separate gdb binary also autoloads pwndbg, pointing it at the real gdbinit.py inside pwndbg's python venv (share/pwndbg/gdbinit.py).
pwndbg is a gdb plug-in, so the packages are linux only (x86_64-linux, aarch64-linux). The home-manager module evaluates everywhere but only resolves the package where it builds.
Use it
Add the input:
{
inputs.pwndbg-nix.url = "github:vmfunc/pwndbg-nix";
# optional, keeps one nixpkgs in the closure:
# inputs.pwndbg-nix.inputs.nixpkgs.follows = "nixpkgs";
}
Enable the home-manager module:
{ inputs, ... }:
{
imports = [ inputs.pwndbg-nix.homeManagerModules.pwndbg ];
programs.pwndbg.enable = true;
}
That installs the pwndbg command and points a plain gdb at pwndbg via ~/.gdbinit. Note the module OWNS ~/.gdbinit. An existing one is backed up by home-manager, not merged. If you keep your own gdbinit, set programs.pwndbg.manageGdbinit = false; and add the source .../share/pwndbg/gdbinit.py line yourself, or just run the bundled pwndbg command which needs no gdbinit.
Just want the package:
nix build github:vmfunc/pwndbg-nix#pwndbg
nix run github:vmfunc/pwndbg-nix#pwndbg
License
MIT. See LICENSE.