zabbix-cli: 2.3.2 -> 3.1.2 (#346725)

This commit is contained in:
Peder Bergebakken Sundt 2024-10-14 01:31:23 +02:00 committed by GitHub
commit ce54b9b1f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 74 additions and 41 deletions

View File

@ -0,0 +1,74 @@
{
lib,
fetchFromGitHub,
python3Packages,
testers,
zabbix-cli,
}:
python3Packages.buildPythonApplication rec {
pname = "zabbix-cli";
version = "3.1.2";
pyproject = true;
src = fetchFromGitHub {
owner = "usit-gd";
repo = "zabbix-cli";
rev = "refs/tags/${version}";
hash = "sha256-It0SVbGNIxf2i4gleqVRAZCIks/Tf/WYSAgipOC+HwE=";
};
pythonRelaxDeps = [ "click-repl" ];
build-system = with python3Packages; [
hatchling
];
dependencies =
with python3Packages;
[
click-repl
httpx
httpx.optional-dependencies.socks
packaging
platformdirs
pydantic
requests
rich
strenum
tomli
tomli-w
typer
typing-extensions
]
++ lib.optionals (pythonOlder "3.10") [
importlib-metadata
];
nativeCheckInputs = with python3Packages; [
freezegun
inline-snapshot
pytestCheckHook
];
# Otherwise tests will fail to create directory
# Permission denied: '/homeless-shelter'
preCheck = ''
export HOME=$(mktemp -d)
'';
pythonImportsCheck = [ "zabbix_cli" ];
passthru.tests.version = testers.testVersion {
package = zabbix-cli;
command = "HOME=$(mktemp -d) zabbix-cli --version";
};
meta = with lib; {
description = "Command-line interface for Zabbix";
homepage = "https://github.com/unioslo/zabbix-cli";
license = licenses.gpl3Plus;
mainProgram = "zabbix-cli";
maintainers = [ maintainers.anthonyroussel ];
};
}

View File

@ -1,39 +0,0 @@
{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "zabbix-cli";
version = "2.3.2";
format = "setuptools";
src = fetchFromGitHub {
owner = "usit-gd";
repo = "zabbix-cli";
rev = "refs/tags/${version}";
sha256 = "sha256-B5t/vxCmPdRR9YKOc2htI57Kmk1ZrpwPUln4JoUrK6g=";
};
propagatedBuildInputs = with python3.pkgs; [
packaging
requests
];
nativeCheckInputs = with python3.pkgs; [
pytestCheckHook
];
disabledTests = [
# TypeError: option values must be strings
"test_descriptor_del"
"test_initialize"
];
meta = with lib; {
description = "Command-line interface for Zabbix";
homepage = "https://github.com/unioslo/zabbix-cli";
license = licenses.gpl3Plus;
maintainers = [ ];
};
}

View File

@ -7252,8 +7252,6 @@ with pkgs;
z-lua = callPackage ../tools/misc/z-lua { };
zabbix-cli = callPackage ../tools/misc/zabbix-cli { };
zabbixctl = callPackage ../tools/misc/zabbixctl { };
zee = callPackage ../applications/editors/zee {