Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
74 lines
1.4 KiB
Nix
74 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
python3Packages,
|
|
testers,
|
|
zabbix-cli,
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "zabbix-cli";
|
|
version = "3.5.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "unioslo";
|
|
repo = "zabbix-cli";
|
|
tag = version;
|
|
hash = "sha256-Sgt3kVbyzNJCSVUYErHNOrgc7Jd3tIwYhwOESRPeAyw=";
|
|
};
|
|
|
|
build-system = with python3Packages; [
|
|
hatchling
|
|
];
|
|
|
|
dependencies =
|
|
with python3Packages;
|
|
[
|
|
httpx
|
|
httpx.optional-dependencies.socks
|
|
packaging
|
|
platformdirs
|
|
prompt-toolkit
|
|
pydantic
|
|
requests
|
|
rich
|
|
strenum
|
|
tomli
|
|
tomli-w
|
|
typer
|
|
typing-extensions
|
|
]
|
|
++ lib.optionals (pythonOlder "3.10") [
|
|
importlib-metadata
|
|
];
|
|
|
|
nativeCheckInputs = with python3Packages; [
|
|
freezegun
|
|
inline-snapshot
|
|
pytestCheckHook
|
|
pytest-httpserver
|
|
];
|
|
|
|
# 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 = {
|
|
description = "Command-line interface for Zabbix";
|
|
homepage = "https://github.com/unioslo/zabbix-cli";
|
|
license = lib.licenses.gpl3Plus;
|
|
mainProgram = "zabbix-cli";
|
|
maintainers = [ lib.maintainers.anthonyroussel ];
|
|
};
|
|
}
|