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