1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 poetry-core,
7 pythonOlder,
8}:
9
10buildPythonPackage rec {
11 pname = "switchbot-api";
12 version = "2.8.0";
13 pyproject = true;
14
15 disabled = pythonOlder "3.10";
16
17 src = fetchFromGitHub {
18 owner = "SeraphicCorp";
19 repo = "py-switchbot-api";
20 tag = "v${version}";
21 hash = "sha256-xalIVkmzflUVkw/DFOLas6T/jUXSs3gZhEa3IJWtEaw=";
22 };
23
24 build-system = [ poetry-core ];
25
26 dependencies = [ aiohttp ];
27
28 # Module has no tests
29 doCheck = false;
30
31 pythonImportsCheck = [ "switchbot_api" ];
32
33 meta = with lib; {
34 description = "Asynchronous library to use Switchbot API";
35 homepage = "https://github.com/SeraphicCorp/py-switchbot-api";
36 changelog = "https://github.com/SeraphicCorp/py-switchbot-api/releases/tag/${src.tag}";
37 license = licenses.mit;
38 maintainers = with maintainers; [ fab ];
39 };
40}