1{ lib
2, stdenv
3, buildPythonPackage
4, defusedxml
5, fetchFromGitHub
6, lxml
7, paramiko
8, poetry-core
9, pontos
10, pytestCheckHook
11, pythonOlder
12}:
13
14buildPythonPackage rec {
15 pname = "python-gvm";
16 version = "23.5.1";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "greenbone";
23 repo = pname;
24 rev = "refs/tags/v${version}";
25 hash = "sha256-jdfrmFpWOuQgYwV2NrRyRDwAZThWdBFgfLByVIZ5HhQ=";
26 };
27
28 nativeBuildInputs = [
29 poetry-core
30 ];
31
32 propagatedBuildInputs = [
33 defusedxml
34 lxml
35 paramiko
36 pontos
37 ];
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 ];
42
43 disabledTests = [
44 # No running SSH available
45 "test_connect_error"
46 ] ++ lib.optionals stdenv.isDarwin [
47 "test_feed_xml_error"
48 ];
49
50 pythonImportsCheck = [
51 "gvm"
52 ];
53
54 meta = with lib; {
55 description = "Collection of APIs that help with remote controlling a Greenbone Security Manager";
56 homepage = "https://github.com/greenbone/python-gvm";
57 changelog = "https://github.com/greenbone/python-gvm/releases/tag/v${version}";
58 license = with licenses; [ gpl3Plus ];
59 maintainers = with maintainers; [ fab ];
60 };
61}