1{ 2 lib, 3 bleak, 4 bleak-retry-connector, 5 boto3, 6 buildPythonPackage, 7 cryptography, 8 fetchFromGitHub, 9 pyopenssl, 10 pythonOlder, 11 pytestCheckHook, 12 requests, 13 setuptools, 14}: 15 16buildPythonPackage rec { 17 pname = "pyswitchbot"; 18 version = "0.45.0"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchFromGitHub { 24 owner = "Danielhiversen"; 25 repo = "pySwitchbot"; 26 rev = "refs/tags/${version}"; 27 hash = "sha256-lQVUHZvAZ4J0DLlUl30dSz2wwXKb9MK5prkXvub0yNI="; 28 }; 29 30 nativeBuildInputs = [ setuptools ]; 31 32 propagatedBuildInputs = [ 33 bleak 34 bleak-retry-connector 35 boto3 36 cryptography 37 pyopenssl 38 requests 39 ]; 40 41 nativeCheckInputs = [ pytestCheckHook ]; 42 43 disabledTests = [ 44 # mismatch in expected data structure 45 "test_parse_advertisement_data_curtain" 46 ]; 47 48 pythonImportsCheck = [ "switchbot" ]; 49 50 meta = with lib; { 51 description = "Python library to control Switchbot IoT devices"; 52 homepage = "https://github.com/Danielhiversen/pySwitchbot"; 53 changelog = "https://github.com/Danielhiversen/pySwitchbot/releases/tag/${version}"; 54 license = with licenses; [ mit ]; 55 maintainers = with maintainers; [ fab ]; 56 platforms = platforms.linux; 57 }; 58}