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";
|
2021-10-14 00:43:12 +00:00
|
|
|
version = "21.10.0";
|
2021-09-18 10:52:07 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "greenbone";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-10-14 00:43:12 +00:00
|
|
|
sha256 = "sha256-6cNoeuB9449HB2/41VjazpSAGvaHmBjG/hqmBKX5FEA=";
|
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
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|