1{ 2 lib, 3 buildPythonPackage, 4 cryptography, 5 fetchFromGitHub, 6 pytest-asyncio, 7 pytestCheckHook, 8 pythonOlder, 9 setuptools, 10 typing-extensions, 11 zeroconf, 12}: 13 14buildPythonPackage rec { 15 pname = "python-rabbitair"; 16 version = "0.0.8"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.6"; 20 21 src = fetchFromGitHub { 22 owner = "rabbit-air"; 23 repo = "python-rabbitair"; 24 rev = "v${version}"; 25 hash = "sha256-CGr7NvnGRNTiKq5BpB/zmfgyd/2ggTbO0nj+Q+MavTs="; 26 }; 27 28 nativeBuildInputs = [ setuptools ]; 29 30 propagatedBuildInputs = [ 31 cryptography 32 zeroconf 33 ] 34 ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ]; 35 36 nativeCheckInputs = [ 37 pytest-asyncio 38 pytestCheckHook 39 ]; 40 41 pythonImportsCheck = [ "rabbitair" ]; 42 43 disabledTests = [ 44 # Tests require network access 45 "test_info" 46 "test_no_response" 47 "test_protocol_error" 48 "test_sequential_requests" 49 "test_set_state" 50 "test_state_a2" 51 "test_state_a3" 52 "test_zeroconf" 53 ]; 54 55 meta = with lib; { 56 description = "Module for the control of Rabbit Air air purifiers"; 57 homepage = "https://github.com/rabbit-air/python-rabbitair"; 58 license = with licenses; [ asl20 ]; 59 maintainers = with maintainers; [ fab ]; 60 }; 61}