From b6fc6b38b7315af1431f375b3c68d8997e2ad49d Mon Sep 17 00:00:00 2001 From: Pamplemousse Date: Thu, 20 Aug 2020 10:14:44 -0700 Subject: [PATCH] python3Packages.pwntools: Allow to use any debugger Signed-off-by: Pamplemousse --- pkgs/development/python-modules/pwntools/default.nix | 9 ++++++++- pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/python-packages.nix | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pwntools/default.nix b/pkgs/development/python-modules/pwntools/default.nix index c7aae24f1dd8..623140546e1d 100644 --- a/pkgs/development/python-modules/pwntools/default.nix +++ b/pkgs/development/python-modules/pwntools/default.nix @@ -1,8 +1,10 @@ { stdenv , buildPythonPackage +, debugger , fetchPypi , isPy3k , Mako +, makeWrapper , packaging , pysocks , pygments @@ -58,10 +60,15 @@ buildPythonPackage rec { doCheck = false; # no setuptools tests for the package + postFixup = '' + mkdir -p "$out/bin" + makeWrapper "${debugger}/bin/${stdenv.lib.strings.getName debugger}" "$out/bin/pwntools-gdb" + ''; + meta = with stdenv.lib; { homepage = "http://pwntools.com"; description = "CTF framework and exploit development library"; license = licenses.mit; - maintainers = with maintainers; [ bennofs kristoff3r ]; + maintainers = with maintainers; [ bennofs kristoff3r pamplemousse ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index be21cc88773c..6eed8a8d5325 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26948,6 +26948,8 @@ in pyload = callPackage ../applications/networking/pyload {}; + pwntools = with python3Packages; toPythonApplication pwntools; + uae = callPackage ../misc/emulators/uae { }; fsuae = callPackage ../misc/emulators/fs-uae { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 57bf95b4606a..a47c2314cd1c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7468,7 +7468,7 @@ in { packet-python = callPackage ../development/python-modules/packet-python { }; - pwntools = callPackage ../development/python-modules/pwntools { }; + pwntools = callPackage ../development/python-modules/pwntools { debugger = pkgs.gdb; }; ROPGadget = callPackage ../development/python-modules/ROPGadget { };