1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pycryptodomex,
7 pysnmp-pyasn1,
8 pysnmp-pysmi,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "pysnmplib";
14 version = "5.0.24";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "pysnmp";
21 repo = "pysnmp";
22 tag = "v${version}";
23 hash = "sha256-AtQqXiy943cYhHDsyz9Yk5uA4xK7Q4p21CT3X3zYzrQ=";
24 };
25
26 nativeBuildInputs = [ poetry-core ];
27
28 propagatedBuildInputs = [
29 pysnmp-pysmi
30 pysnmp-pyasn1
31 pycryptodomex
32 ];
33
34 # Module has no test, examples are used for testing
35 doCheck = false;
36
37 pythonImportsCheck = [ "pysnmp" ];
38
39 meta = with lib; {
40 description = "Implementation of v1/v2c/v3 SNMP engine";
41 homepage = "https://github.com/pysnmp/pysnmp";
42 changelog = "https://github.com/pysnmp/pysnmp/releases/tag/v${version}";
43 license = with licenses; [ mit ];
44 maintainers = with maintainers; [ fab ];
45 };
46}