diff --git a/pkgs/development/python-modules/ROPGadget/default.nix b/pkgs/development/python-modules/ROPGadget/default.nix deleted file mode 100644 index 6be0ed48e289..000000000000 --- a/pkgs/development/python-modules/ROPGadget/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ lib, buildPythonPackage, fetchPypi -, capstone}: - -buildPythonPackage rec { - pname = "ROPGadget"; - version = "6.6"; - - src = fetchPypi { - inherit pname version; - sha256 = "dc61186e0114ec67ec7ce374df8fd2ddc2a7cba129a1242338e900a7483fba22"; - }; - - propagatedBuildInputs = [ capstone ]; - - meta = with lib; { - description = "Tool to search for gadgets in binaries to facilitate ROP exploitation"; - homepage = "http://shell-storm.org/project/ROPgadget/"; - license = licenses.bsd3; - maintainers = with maintainers; [ bennofs ]; - }; -} diff --git a/pkgs/development/python-modules/pwntools/default.nix b/pkgs/development/python-modules/pwntools/default.nix index 6241a7d86e46..cfcbf14703b0 100644 --- a/pkgs/development/python-modules/pwntools/default.nix +++ b/pkgs/development/python-modules/pwntools/default.nix @@ -6,7 +6,7 @@ , packaging , pysocks , pygments -, ROPGadget +, ropgadget , capstone , colored-traceback , paramiko @@ -55,7 +55,7 @@ buildPythonPackage rec { packaging pysocks pygments - ROPGadget + ropgadget capstone colored-traceback paramiko diff --git a/pkgs/development/python-modules/ropgadget/default.nix b/pkgs/development/python-modules/ropgadget/default.nix new file mode 100644 index 000000000000..aaf31f06a1cc --- /dev/null +++ b/pkgs/development/python-modules/ropgadget/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, capstone +}: + +buildPythonPackage rec { + pname = "ropgadget"; + version = "6.6"; + + src = fetchFromGitHub { + owner = "JonathanSalwan"; + repo = "ROPgadget"; + rev = "v${version}"; + sha256 = "1i0gx0cwhxk6d8byvck17hh83szz3k6ndd118ha3q0r0msap0lz1"; + }; + + propagatedBuildInputs = [ + capstone + ]; + + # Test suite is working with binaries + doCheck = false; + + pythonImportsCheck = [ + "ropgadget" + ]; + + meta = with lib; { + description = "Tool to search for gadgets in binaries to facilitate ROP exploitation"; + homepage = "http://shell-storm.org/project/ROPgadget/"; + license = licenses.bsd3; + maintainers = with maintainers; [ bennofs ]; + }; +} diff --git a/pkgs/development/tools/misc/pwndbg/default.nix b/pkgs/development/tools/misc/pwndbg/default.nix index 9aa11f35957f..01b399e15a39 100644 --- a/pkgs/development/tools/misc/pwndbg/default.nix +++ b/pkgs/development/tools/misc/pwndbg/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , python3 , fetchFromGitHub , makeWrapper @@ -13,7 +14,7 @@ let pycparser pyelftools python-ptrace - ROPGadget + ropgadget six unicorn pygments diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 58d14f225d47..f4c9960231ce 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3527,6 +3527,8 @@ with pkgs; restream = callPackage ../applications/misc/remarkable/restream { }; + ropgadget = with python3Packages; toPythonApplication ropgadget; + ryujinx = callPackage ../misc/emulators/ryujinx { }; scour = with python3Packages; toPythonApplication scour; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index d863ce5c21b1..4c14877d1558 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -92,6 +92,7 @@ mapAliases ({ scikitlearn = scikit-learn; # added 2021-07-21 selectors34 = throw "selectors34 has been removed: functionality provided by Python itself; archived by upstream."; # added 2021-06-10 setuptools_scm = setuptools-scm; # added 2021-06-03 + ROPGadget = ropgadget; # added 2021-07-06 smart_open = smart-open; # added 2021-03-14 smmap2 = throw "smmap2 has been deprecated, use smmap instead."; # added 2020-03-14 sphinxcontrib_plantuml = sphinxcontrib-plantuml; # added 2021-08-02 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fd6ccefe3a44..f9f15b5067c6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8336,7 +8336,7 @@ in { rope = callPackage ../development/python-modules/rope { }; - ROPGadget = callPackage ../development/python-modules/ROPGadget { }; + ropgadget = callPackage ../development/python-modules/ropgadget { }; ropper = callPackage ../development/python-modules/ropper { };