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