Merge pull request #138944 from fabaff/faraday-cli
This commit is contained in:
commit
a872b54511
6 changed files with 199 additions and 0 deletions
64
pkgs/development/python-modules/faraday-plugins/default.nix
Normal file
64
pkgs/development/python-modules/faraday-plugins/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
26
pkgs/development/python-modules/python-status/default.nix
Normal file
26
pkgs/development/python-modules/python-status/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
|
@ -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 ];
|
||||
};
|
||||
}
|
46
pkgs/tools/security/faraday-cli/default.nix
Normal file
46
pkgs/tools/security/faraday-cli/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
|
@ -5014,6 +5014,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 {};
|
||||
|
|
|
@ -2506,6 +2506,8 @@ in {
|
|||
|
||||
falcon = callPackage ../development/python-modules/falcon { };
|
||||
|
||||
faraday-plugins = callPackage ../development/python-modules/faraday-plugins { };
|
||||
|
||||
fastapi = callPackage ../development/python-modules/fastapi { };
|
||||
|
||||
fastavro = callPackage ../development/python-modules/fastavro { };
|
||||
|
@ -7140,6 +7142,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 { };
|
||||
|
@ -8270,6 +8274,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 { };
|
||||
|
|
Loading…
Reference in a new issue