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