1{
2 lib,
3 aiohttp,
4 aiohttp-sse-client2,
5 aioresponses,
6 buildPythonPackage,
7 fetchFromGitHub,
8 mashumaro,
9 orjson,
10 poetry-core,
11 pytest-asyncio,
12 pytest-cov-stub,
13 pytestCheckHook,
14 pythonOlder,
15 syrupy,
16 yarl,
17}:
18
19buildPythonPackage rec {
20 pname = "pysmartthings";
21 version = "3.3.0";
22 pyproject = true;
23
24 disabled = pythonOlder "3.12";
25
26 src = fetchFromGitHub {
27 owner = "andrewsayre";
28 repo = "pysmartthings";
29 tag = "v${version}";
30 hash = "sha256-i1whnELYPkaT7K5hLZy+Q4Aub1TBph8aDFZKx78hElY=";
31 };
32
33 build-system = [ poetry-core ];
34
35 dependencies = [
36 aiohttp
37 aiohttp-sse-client2
38 mashumaro
39 orjson
40 yarl
41 ];
42
43 nativeCheckInputs = [
44 aioresponses
45 pytest-asyncio
46 pytest-cov-stub
47 pytestCheckHook
48 syrupy
49 ];
50
51 pythonImportsCheck = [ "pysmartthings" ];
52
53 meta = with lib; {
54 description = "Python library for interacting with the SmartThings cloud API";
55 homepage = "https://github.com/andrewsayre/pysmartthings";
56 changelog = "https://github.com/andrewsayre/pysmartthings/releases/tag/${src.tag}";
57 license = with licenses; [ mit ];
58 maintainers = with maintainers; [ fab ];
59 };
60}