at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 flit-core, 6 jinja2, 7 ply, 8 pysmi, 9 pysnmp, 10 pytestCheckHook, 11 pythonOlder, 12 requests, 13}: 14 15buildPythonPackage rec { 16 version = "1.6.2"; 17 pname = "pysmi"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.8"; 21 22 src = fetchFromGitHub { 23 owner = "lextudio"; 24 repo = "pysmi"; 25 tag = "v${version}"; 26 hash = "sha256-GyG3J6qntEIszXrm1t623+x1cYbhJLbTEQl6N2h2LA0="; 27 }; 28 29 build-system = [ flit-core ]; 30 31 dependencies = [ 32 ply 33 jinja2 34 requests 35 ]; 36 37 nativeCheckInputs = [ 38 pysnmp 39 pytestCheckHook 40 ]; 41 42 # Tests require pysnmp, which in turn requires pysmi => infinite recursion 43 doCheck = false; 44 45 pythonImportsCheck = [ "pysmi" ]; 46 47 passthru.tests.pytest = pysmi.overridePythonAttrs { doCheck = true; }; 48 49 meta = with lib; { 50 description = "SNMP MIB parser"; 51 homepage = "https://github.com/lextudio/pysmi"; 52 changelog = "https://github.com/lextudio/pysmi/blob/v${version}/CHANGES.rst"; 53 license = licenses.bsd2; 54 maintainers = with maintainers; [ fab ]; 55 }; 56}