diff --git a/pkgs/by-name/tr/trevorproxy/package.nix b/pkgs/by-name/tr/trevorproxy/package.nix new file mode 100644 index 000000000000..c255035084d9 --- /dev/null +++ b/pkgs/by-name/tr/trevorproxy/package.nix @@ -0,0 +1 @@ +{ python3Packages }: with python3Packages; toPythonApplication trevorproxy diff --git a/pkgs/by-name/tr/trevorspray/package.nix b/pkgs/by-name/tr/trevorspray/package.nix new file mode 100644 index 000000000000..9b3e5efadf6b --- /dev/null +++ b/pkgs/by-name/tr/trevorspray/package.nix @@ -0,0 +1,37 @@ +{ + lib, + python3, + fetchPypi, +}: + +python3.pkgs.buildPythonApplication rec { + pname = "trevorspray"; + version = "2.3.1"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-2kprXyZUAe8lBV48mBpmkhBtOoxgrP/TOTdS3Kw2WTE="; + }; + + build-system = with python3.pkgs; [ poetry-core ]; + + dependencies = with python3.pkgs; [ + beautifulsoup4 + exchangelib + mechanicalsoup + pygments + pysocks + sh + tldextract + trevorproxy + ]; + + meta = { + description = "Modular password spraying tool"; + homepage = "https://github.com/blacklanternsecurity/TREVORspray"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "trevorspray"; + }; +} diff --git a/pkgs/development/python-modules/mechanicalsoup/default.nix b/pkgs/development/python-modules/mechanicalsoup/default.nix index 75692db12f22..50f9b41924fd 100644 --- a/pkgs/development/python-modules/mechanicalsoup/default.nix +++ b/pkgs/development/python-modules/mechanicalsoup/default.nix @@ -4,20 +4,19 @@ buildPythonPackage, fetchFromGitHub, lxml, + pytest-cov-stub, pytest-httpbin, pytest-mock, pytestCheckHook, - pythonOlder, - requests, requests-mock, + requests, + setuptools, }: buildPythonPackage rec { pname = "mechanicalsoup"; version = "1.4.0"; - format = "setuptools"; - - disabled = pythonOlder "3.7"; + pyproject = true; src = fetchFromGitHub { owner = "MechanicalSoup"; @@ -31,10 +30,12 @@ buildPythonPackage rec { substituteInPlace setup.py \ --replace "'pytest-runner'" "" substituteInPlace setup.cfg \ - --replace " --cov --cov-config .coveragerc --flake8" "" + --replace " --flake8" "" ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ beautifulsoup4 lxml requests @@ -43,6 +44,7 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; nativeCheckInputs = [ + pytest-cov-stub pytest-httpbin pytest-mock pytestCheckHook @@ -51,6 +53,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "mechanicalsoup" ]; + disabledTests = [ + # Missing module + "test_select_form_associated_elements" + ]; + meta = with lib; { description = "Python library for automating interaction with websites"; homepage = "https://github.com/hickford/MechanicalSoup"; diff --git a/pkgs/development/python-modules/trevorproxy/default.nix b/pkgs/development/python-modules/trevorproxy/default.nix new file mode 100644 index 000000000000..d53e76b6b0a2 --- /dev/null +++ b/pkgs/development/python-modules/trevorproxy/default.nix @@ -0,0 +1,32 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + poetry-core, + sh, +}: + +buildPythonPackage rec { + pname = "trevorproxy"; + version = "1.0.9"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-ZUOqtJmLiZbe2LBkpTGELeKFkmzA0WCJ/TXPi9eyRXs="; + }; + + build-system = [ poetry-core ]; + + dependencies = [ sh ]; + + pythonImportsCheck = [ "trevorproxy" ]; + + meta = { + description = "Module to rotate the source IP address via SSH proxies and other methods"; + homepage = "https://github.com/blacklanternsecurity/TREVORproxy"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "trevorproxy"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bdd94620cdc6..a47ffad480aa 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18136,6 +18136,8 @@ self: super: with self; { treq = callPackage ../development/python-modules/treq { }; + trevorproxy = callPackage ../development/python-modules/trevorproxy { }; + trezor = callPackage ../development/python-modules/trezor { }; trezor-agent = callPackage ../development/python-modules/trezor-agent {