1{ lib 2, buildPythonPackage 3, pythonAtLeast 4, fetchFromGitHub 5, net-snmp 6, openssl 7, pytest 8, pytest-cov 9, pytest-flake8 10, pytest-sugar 11, termcolor 12}: 13 14buildPythonPackage rec { 15 pname = "easysnmp"; 16 version = "0.2.5"; 17 18 # See https://github.com/kamakazikamikaze/easysnmp/issues/108 19 disabled = pythonAtLeast "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "kamakazikamikaze"; 23 repo = pname; 24 rev = version; 25 sha256 = "1si9iyxqj6z22jzn6m93lwpinsqn20lix2py3jm3g3fmwawkd735"; 26 }; 27 28 checkInputs = [ 29 pytest 30 pytest-cov 31 pytest-flake8 32 pytest-sugar 33 termcolor 34 ]; 35 36 buildInputs = [ 37 net-snmp 38 openssl 39 ]; 40 41 buildPhase = '' 42 python setup.py build bdist_wheel --basedir=${lib.getBin net-snmp}/bin 43 ''; 44 45 # Unable to get tests to pass, even running by hand. The pytest tests have 46 # become stale. 47 doCheck = false; 48 49 meta = with lib; { 50 description = "A blazingly fast and Pythonic SNMP library based on the official Net-SNMP bindings"; 51 homepage = "https://easysnmp.readthedocs.io/en/latest/"; 52 license = licenses.bsd3; 53 maintainers = with maintainers; [ WhittlesJr ]; 54 }; 55}