blob: e9251892bd07f41d3d190c62edfcc83d0f74e330 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "py-zabbix";
version = "1.1.7";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "adubkov";
repo = "py-zabbix";
rev = "refs/tags/${version}";
hash = "sha256-aPQc188pszfDQvNtsGYlRLHS5CG5VyqptSoe4/GJVvE=";
};
patches = [
# Remove Python2 comp, https://github.com/adubkov/py-zabbix/pull/154
(fetchpatch {
name = "no-more-py2.patch";
url = "https://github.com/adubkov/py-zabbix/commit/8deedb860f52870fbeacc54a40341520702341e2.patch";
hash = "sha256-Af7pnCZIObC0ZQLaamBK1pTAVAFs/Mh7+og5jAKqk4s=";
})
];
build-system = [ setuptools ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "pyzabbix" ];
disabledTests = lib.optionals (pythonAtLeast "3.12") [
# AttributeError: 'RawConfigParser' object has no attribute 'readfp'
"config"
];
meta = with lib; {
description = "Python module to interact with Zabbix";
homepage = "https://github.com/adubkov/py-zabbix";
changelog = "https://github.com/adubkov/py-zabbix/releases/tag/${version}";
license = licenses.gpl2Only;
maintainers = with maintainers; [ fab ];
};
}
|