1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pysnmp 5, pytest-asyncio 6, pytest-error-for-skips 7, pytest-runner 8, pytestCheckHook 9, pythonOlder 10}: 11 12buildPythonPackage rec { 13 pname = "brother"; 14 version = "1.1.0"; 15 disabled = pythonOlder "3.8"; 16 17 src = fetchFromGitHub { 18 owner = "bieniu"; 19 repo = pname; 20 rev = version; 21 sha256 = "sha256-ZDQIpzdr3XkYrSUgrBDZsUwUZRQCdJdvmniMezvJxzU="; 22 }; 23 24 nativeBuildInputs = [ 25 pytest-runner 26 ]; 27 28 postPatch = '' 29 substituteInPlace setup.cfg \ 30 --replace "--cov --cov-report term-missing " "" 31 ''; 32 33 propagatedBuildInputs = [ 34 pysnmp 35 ]; 36 37 checkInputs = [ 38 pytest-asyncio 39 pytest-error-for-skips 40 pytestCheckHook 41 ]; 42 43 pythonImportsCheck = [ "brother" ]; 44 45 meta = with lib; { 46 description = "Python wrapper for getting data from Brother laser and inkjet printers via SNMP"; 47 homepage = "https://github.com/bieniu/brother"; 48 license = licenses.asl20; 49 maintainers = with maintainers; [ hexa ]; 50 }; 51}