Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.python-gvm: init at 21.6.0, python3Packages.gvm-tools: init at 21.6.1 #137031

Merged
merged 2 commits into from
Sep 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions pkgs/development/python-modules/gvm-tools/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, poetry-core
, pytestCheckHook
, python-gvm
, pythonOlder
}:

buildPythonPackage rec {
pname = "gvm-tools";
version = "21.6.1";
format = "pyproject";

disabled = pythonOlder "3.7";

src = fetchFromGitHub {
owner = "greenbone";
repo = pname;
rev = "v${version}";
sha256 = "1n9alryf52xkwxwagmq8bdn3a8scnmgh3qfdjwj6jybcyk36rv6n";
};

nativeBuildInputs = [
poetry-core
];

propagatedBuildInputs = [
python-gvm
];

checkInputs = [
pytestCheckHook
];

patches = [
# Switch to poetry-core, https://github.com/greenbone/gvm-tools/pull/520
(fetchpatch {
name = "switch-to-poetry-core.patch";
url = "https://github.com/greenbone/gvm-tools/commit/db65495181ca339610b1007a33cc13285a470242.patch";
sha256 = "069rg742pxjd36vap0xp6367rd69pji4yfxbycc7z0b8gvf80w5z";
})
];

pythonImportsCheck = [ "gvmtools" ];

meta = with lib; {
description = "Collection of APIs that help with remote controlling a Greenbone Security Manager";
homepage = "https://github.com/greenbone/gvm-tools";
license = with licenses; [ gpl3Plus ];
maintainers = with maintainers; [ fab ];
};
}
66 changes: 66 additions & 0 deletions pkgs/development/python-modules/python-gvm/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, poetry-core
, pytestCheckHook
, pythonOlder
, paramiko
, lxml
, defusedxml
}:

buildPythonPackage rec {
pname = "python-gvm";
version = "21.6.0";
format = "pyproject";

disabled = pythonOlder "3.7";

src = fetchFromGitHub {
owner = "greenbone";
repo = pname;
rev = "v${version}";
sha256 = "070qpj2y7834i50lhkkbv93s77j91js06zs1bpbmplppiraxqmyz";
};

nativeBuildInputs = [
poetry-core
];

propagatedBuildInputs = [
paramiko
lxml
defusedxml
];

checkInputs = [
pytestCheckHook
];

patches = [
# Switch to poetry-core, https://github.com/greenbone/python-gvm/pull/552
(fetchpatch {
name = "switch-to-poetry-core.patch";
url = "https://github.com/greenbone/python-gvm/commit/e48afa614ba9cf69d9b22ce1a4642c625acbaa06.patch";
sha256 = "0f5wfdymp5dcjk1xb7ynsf0g6idjg2ifwgggp4agic5nkh1k1inl";
})
];

disabledTests = [
# No running SSH available
"test_connect_error"
] ++ lib.optionals stdenv.isDarwin [
"test_feed_xml_error"
];

pythonImportsCheck = [ "gvm" ];

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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5785,6 +5785,8 @@ with pkgs;

gupnp-tools = callPackage ../tools/networking/gupnp-tools {};

gvm-tools = with python3.pkgs; toPythonApplication gvm-tools;

gvpe = callPackage ../tools/networking/gvpe {
openssl = openssl_1_0_2;
};
Expand Down
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3241,6 +3241,8 @@ in {

guzzle_sphinx_theme = callPackage ../development/python-modules/guzzle_sphinx_theme { };

gvm-tools = callPackage ../development/python-modules/gvm-tools {};

gviz-api = callPackage ../development/python-modules/gviz-api {};

gym = callPackage ../development/python-modules/gym { };
Expand Down Expand Up @@ -7133,6 +7135,8 @@ in {

python-gnupg = callPackage ../development/python-modules/python-gnupg { };

python-gvm = callPackage ../development/python-modules/python-gvm { };

python-hosts = callPackage ../development/python-modules/python-hosts { };

python-hpilo = callPackage ../development/python-modules/python-hpilo { };
Expand Down