Merge pull request #138944 from fabaff/faraday-cli

This commit is contained in:
Sandro
2021-09-22 23:20:36 +02:00
committed by GitHub
6 changed files with 199 additions and 0 deletions
@@ -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 ];
};
}
@@ -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 ];
};
}