1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchpatch
5, pytestCheckHook
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "py-zabbix";
11 version = "1.1.7";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.8";
15
16 src = fetchFromGitHub {
17 owner = "adubkov";
18 repo = "py-zabbix";
19 rev = "refs/tags/${version}";
20 hash = "sha256-aPQc188pszfDQvNtsGYlRLHS5CG5VyqptSoe4/GJVvE=";
21 };
22
23 patches = [
24 # Remove Python2 comp, https://github.com/adubkov/py-zabbix/pull/154
25 (fetchpatch {
26 name = "no-more-py2.patch";
27 url = "https://github.com/adubkov/py-zabbix/commit/8deedb860f52870fbeacc54a40341520702341e2.patch";
28 hash = "sha256-Af7pnCZIObC0ZQLaamBK1pTAVAFs/Mh7+og5jAKqk4s=";
29 })
30 ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 ];
35
36 pythonImportsCheck = [
37 "pyzabbix"
38 ];
39
40 meta = with lib; {
41 description = "Python module to interact with Zabbix";
42 homepage = "https://github.com/adubkov/py-zabbix";
43 license = licenses.gpl2Only;
44 maintainers = with maintainers; [ fab ];
45 };
46}