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-12 12:48:02 +00:00
|
|
|
version = "23.4.0";
|
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-12 12:48:02 +00:00
|
|
|
hash = "sha256-qpPoE5QSm6JwBG3842gjxGeSd87yY2/T/HFi4k8U/qY=";
|
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";
|
|
|
|
license = with licenses; [ gpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|