From 59ff8e13b5741459ab8006eae567848d2a490047 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 22 Sep 2021 12:12:08 +0200 Subject: [PATCH 1/4] python3Packages.faraday-plugins: init at 1.5.3 --- .../faraday-plugins/default.nix | 64 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 66 insertions(+) create mode 100644 pkgs/development/python-modules/faraday-plugins/default.nix diff --git a/pkgs/development/python-modules/faraday-plugins/default.nix b/pkgs/development/python-modules/faraday-plugins/default.nix new file mode 100644 index 000000000000..3b6b42a7678e --- /dev/null +++ b/pkgs/development/python-modules/faraday-plugins/default.nix @@ -0,0 +1,64 @@ +{ lib +, beautifulsoup4 +, buildPythonPackage +, click +, colorama +, fetchFromGitHub +, html2text +, lxml +, pytestCheckHook +, python-dateutil +, pytz +, requests +, simplejson +, tabulate +}: + +buildPythonPackage rec { + pname = "faraday-plugins"; + version = "1.5.3"; + + src = fetchFromGitHub { + owner = "infobyte"; + repo = "faraday_plugins"; + rev = "v${version}"; + sha256 = "0nyywpsyw7akwdah75s9mz5nz11y1hbynp08pvqifwdw49crih02"; + }; + + propagatedBuildInputs = [ + beautifulsoup4 + click + colorama + html2text + lxml + python-dateutil + pytz + requests + simplejson + tabulate + ]; + + checkInputs = [ + pytestCheckHook + ]; + + disabledTestPaths = [ + # faraday itself is currently not available + "tests/test_report_collection.py" + ]; + + disabledTests = [ + # Fail because of missing faraday + "test_detect_report" + "test_process_report_summary" + ]; + + pythonImportsCheck = [ "faraday_plugins" ]; + + meta = with lib; { + description = "Security tools report parsers for Faraday"; + homepage = "https://github.com/infobyte/faraday_plugins"; + license = with licenses; [ gpl3Only ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8c005de4611b..37d35ec139a8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2504,6 +2504,8 @@ in { falcon = callPackage ../development/python-modules/falcon { }; + faraday-plugins = callPackage ../development/python-modules/faraday-plugins { }; + fastapi = callPackage ../development/python-modules/fastapi { }; fastcache = callPackage ../development/python-modules/fastcache { }; From 7c04423e742f1ebdef67caecfcee1f666c90f7af Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 22 Sep 2021 12:32:51 +0200 Subject: [PATCH 2/4] python3Packages.python-status: init at 1.0.1 --- .../python-modules/python-status/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/python-modules/python-status/default.nix diff --git a/pkgs/development/python-modules/python-status/default.nix b/pkgs/development/python-modules/python-status/default.nix new file mode 100644 index 000000000000..2633d93c312f --- /dev/null +++ b/pkgs/development/python-modules/python-status/default.nix @@ -0,0 +1,26 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "python-status"; + version = "1.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0lryrvmi04g7d38ilm4wfw717m0ddhylrzb5cm59lrp3ai3q572f"; + }; + + # Project doesn't ship tests yet + doCheck = false; + + pythonImportsCheck = [ "status" ]; + + meta = with lib; { + description = "HTTP Status for Humans"; + homepage = "https://github.com/avinassh/status/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 37d35ec139a8..61cd9554abcf 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7110,6 +7110,8 @@ in { pytest-shutil = callPackage ../development/python-modules/pytest-shutil { }; + python-status = callPackage ../development/python-modules/python-status { }; + python-string-utils = callPackage ../development/python-modules/python-string-utils { }; pytest-socket = callPackage ../development/python-modules/pytest-socket { }; From 787af490214e142ee836b959b560d12bd8a87272 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 22 Sep 2021 12:39:43 +0200 Subject: [PATCH 3/4] python3Packages.simple-rest-client: init at 1.0.8 --- .../simple-rest-client/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/simple-rest-client/default.nix diff --git a/pkgs/development/python-modules/simple-rest-client/default.nix b/pkgs/development/python-modules/simple-rest-client/default.nix new file mode 100644 index 000000000000..b9b1cbe7b058 --- /dev/null +++ b/pkgs/development/python-modules/simple-rest-client/default.nix @@ -0,0 +1,55 @@ +{ lib +, asynctest +, buildPythonPackage +, fetchFromGitHub +, httpx +, pytest-asyncio +, pytest-httpserver +, pytestCheckHook +, python-slugify +, python-status +, pythonOlder +}: + +buildPythonPackage rec { + pname = "simple-rest-client"; + version = "1.0.8"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "allisson"; + repo = "python-simple-rest-client"; + rev = version; + sha256 = "12qxhrjhlbyyr1pkvwfkcxbsmyns5b0mfdn42vz310za5x76ldj3"; + }; + + propagatedBuildInputs = [ + httpx + python-slugify + python-status + ]; + + checkInputs = [ + asynctest + pytest-asyncio + pytest-httpserver + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace "pytest-runner" "" + substituteInPlace pytest.ini \ + --replace " --cov=simple_rest_client --cov-report=term-missing" "" + ''; + + pythonImportsCheck = [ "simple_rest_client" ]; + + meta = with lib; { + description = "Simple REST client for Python"; + homepage = "https://github.com/allisson/python-simple-rest-client"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 61cd9554abcf..a92fceabef15 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8232,6 +8232,8 @@ in { simplekml = callPackage ../development/python-modules/simplekml { }; + simple-rest-client = callPackage ../development/python-modules/simple-rest-client { }; + simple-salesforce = callPackage ../development/python-modules/simple-salesforce { }; simple-websocket-server = callPackage ../development/python-modules/simple-websocket-server { }; From 60218ef0bccae93d65c967a4edc7c1f4cbcc3d86 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 22 Sep 2021 15:12:23 +0200 Subject: [PATCH 4/4] faraday-cli: init at 2.0.2 --- pkgs/tools/security/faraday-cli/default.nix | 46 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/tools/security/faraday-cli/default.nix diff --git a/pkgs/tools/security/faraday-cli/default.nix b/pkgs/tools/security/faraday-cli/default.nix new file mode 100644 index 000000000000..c220fe4ded0f --- /dev/null +++ b/pkgs/tools/security/faraday-cli/default.nix @@ -0,0 +1,46 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "faraday-cli"; + version = "2.0.2"; + + disabled = python3.pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "infobyte"; + repo = pname; + rev = "v${version}"; + sha256 = "1jq8sim0b6k830lv1qzbrd1mx0nc2x1jq24fbama76gzqlb2axi7"; + }; + + propagatedBuildInputs = with python3.pkgs; [ + click + colorama + faraday-plugins + jsonschema + pyyaml + simple-rest-client + tabulate + validators + spinners + termcolor + cmd2 + log-symbols + arrow + ]; + + # Tests requires credentials + doCheck = false; + + pythonImportsCheck = [ "faraday_cli" ]; + + meta = with lib; { + description = "Command Line Interface for Faraday"; + homepage = "https://github.com/infobyte/faraday-cli"; + license = with licenses; [ gpl3Only ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e7fbd3653863..c10e67929bd5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4980,6 +4980,8 @@ with pkgs; fabric-installer = callPackage ../tools/games/minecraft/fabric-installer { }; + faraday-cli = callPackage ../tools/security/faraday-cli { }; + fastlane = callPackage ../tools/admin/fastlane { }; fatresize = callPackage ../tools/filesystems/fatresize {};