2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
2021-10-14 00:43:12 +00:00
|
|
|
, defusedxml
|
2021-09-18 10:52:07 +00:00
|
|
|
, fetchFromGitHub
|
2021-10-14 00:43:12 +00:00
|
|
|
, lxml
|
|
|
|
, paramiko
|
2021-09-18 10:52:07 +00:00
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-gvm";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "23.4.2";
|
2021-09-18 10:52:07 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "greenbone";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-ONCPC05NYyymTKiJZaDTdcShLLy4+K+JwROVVXBkz+o=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
defusedxml
|
2021-10-14 00:43:12 +00:00
|
|
|
lxml
|
|
|
|
paramiko
|
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
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# No running SSH available
|
|
|
|
"test_connect_error"
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
"test_feed_xml_error"
|
|
|
|
];
|
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"gvm"
|
|
|
|
];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Collection of APIs that help with remote controlling a Greenbone Security Manager";
|
|
|
|
homepage = "https://github.com/greenbone/python-gvm";
|
2023-04-29 16:46:19 +00:00
|
|
|
changelog = "https://github.com/greenbone/python-gvm/releases/tag/v${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = with licenses; [ gpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|