2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-08-21 13:32:41 +00:00
|
|
|
, colorful
|
2021-09-18 10:52:07 +00:00
|
|
|
, fetchFromGitHub
|
2022-08-21 13:32:41 +00:00
|
|
|
, git
|
|
|
|
, httpx
|
|
|
|
, packaging
|
2021-09-26 12:46:18 +00:00
|
|
|
, poetry-core
|
2021-09-18 10:52:07 +00:00
|
|
|
, pytestCheckHook
|
2022-12-28 21:21:41 +00:00
|
|
|
, python-dateutil
|
2021-09-18 10:52:07 +00:00
|
|
|
, pythonOlder
|
2022-08-21 13:32:41 +00:00
|
|
|
, rich
|
2021-09-18 10:52:07 +00:00
|
|
|
, tomlkit
|
2022-12-28 21:21:41 +00:00
|
|
|
, typing-extensions
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pontos";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "23.3.3";
|
2021-09-18 10:52:07 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "greenbone";
|
|
|
|
repo = pname;
|
2022-09-22 12:36:57 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-Wd02dlRIRBBJ2cKNxIZxOoWjp1aPxqmc37tvUbc/pJk=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-09-26 12:46:18 +00:00
|
|
|
poetry-core
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
colorful
|
2022-08-21 13:32:41 +00:00
|
|
|
httpx
|
2022-02-10 20:34:41 +00:00
|
|
|
packaging
|
2022-12-28 21:21:41 +00:00
|
|
|
python-dateutil
|
2022-08-21 13:32:41 +00:00
|
|
|
rich
|
2022-11-27 09:42:12 +00:00
|
|
|
typing-extensions
|
2022-08-21 13:32:41 +00:00
|
|
|
tomlkit
|
2022-11-27 09:42:12 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
typing-extensions
|
|
|
|
] ++ httpx.optional-dependencies.http2;
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
git
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2022-08-21 13:32:41 +00:00
|
|
|
"PrepareTestCase"
|
2021-09-18 10:52:07 +00:00
|
|
|
# Signing fails
|
|
|
|
"test_find_no_signing_key"
|
|
|
|
"test_find_signing_key"
|
|
|
|
"test_find_unreleased_information"
|
2021-10-08 15:17:17 +00:00
|
|
|
# CLI test fails
|
|
|
|
"test_missing_cmd"
|
2022-05-18 14:49:53 +00:00
|
|
|
"test_update_file_changed"
|
2022-07-14 12:49:19 +00:00
|
|
|
# Network access
|
|
|
|
"test_fail_sign_on_upload_fail"
|
|
|
|
"test_successfully_sign"
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pontos"
|
|
|
|
];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Collection of Python utilities, tools, classes and functions";
|
|
|
|
homepage = "https://github.com/greenbone/pontos";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/greenbone/pontos/releases/tag/v${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = with licenses; [ gpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|