2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
defusedxml,
|
|
|
|
fetchFromGitHub,
|
|
|
|
marshmallow,
|
|
|
|
pytest-datafiles,
|
|
|
|
pytest-vcr,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-box,
|
|
|
|
python-dateutil,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
requests-pkcs12,
|
|
|
|
responses,
|
|
|
|
restfly,
|
|
|
|
semver,
|
|
|
|
setuptools,
|
|
|
|
typing-extensions,
|
2021-04-05 15:23:46 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytenable";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.4.22";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2022-01-26 04:04:25 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tenable";
|
|
|
|
repo = "pyTenable";
|
2022-06-26 10:26:21 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-acMafLlO0yGEnW+0XeBWUpDWvOPFAB4RK/XyAb2JbPw=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2021-04-05 15:23:46 +00:00
|
|
|
defusedxml
|
|
|
|
marshmallow
|
|
|
|
python-box
|
|
|
|
python-dateutil
|
|
|
|
requests
|
|
|
|
restfly
|
2023-08-22 20:05:09 +00:00
|
|
|
semver
|
2021-12-06 16:07:01 +00:00
|
|
|
typing-extensions
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-05 15:23:46 +00:00
|
|
|
pytest-datafiles
|
|
|
|
pytest-vcr
|
|
|
|
pytestCheckHook
|
2023-08-22 20:05:09 +00:00
|
|
|
requests-pkcs12
|
|
|
|
responses
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Disable tests that requires network access
|
|
|
|
"tests/io/"
|
|
|
|
];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Disable tests that requires a Docker container
|
|
|
|
"test_uploads_docker_push_name_typeerror"
|
|
|
|
"test_uploads_docker_push_tag_typeerror"
|
|
|
|
"test_uploads_docker_push_cs_name_typeerror"
|
|
|
|
"test_uploads_docker_push_cs_tag_typeerror"
|
2023-11-16 04:20:00 +00:00
|
|
|
# Test requires network access
|
|
|
|
"test_assets_list_vcr"
|
|
|
|
"test_events_list_vcr"
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "tenable" ];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for the Tenable.io and TenableSC API";
|
|
|
|
homepage = "https://github.com/tenable/pyTenable";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/tenable/pyTenable/releases/tag/${version}";
|
2021-04-05 15:23:46 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|