1{
2 lib,
3 buildPythonPackage,
4 colorama,
5 cryptography,
6 fetchFromGitHub,
7 pythonOlder,
8 requests,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "tinytuya";
14 version = "1.17.2";
15 pyproject = true;
16
17 disabled = pythonOlder "3.10";
18
19 src = fetchFromGitHub {
20 owner = "jasonacox";
21 repo = "tinytuya";
22 tag = "v${version}";
23 hash = "sha256-x6ZfpT3ucby95uthHX4KLLZNLWxyh6+ERDd5jb7p09g=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [
29 cryptography
30 requests
31 colorama
32 ];
33
34 # Tests require real network resources
35 doCheck = false;
36
37 pythonImportsCheck = [ "tinytuya" ];
38
39 meta = with lib; {
40 description = "Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API)";
41 homepage = "https://github.com/jasonacox/tinytuya";
42 changelog = "https://github.com/jasonacox/tinytuya/releases/tag/${src.tag}";
43 license = licenses.mit;
44 maintainers = with maintainers; [ pathob ];
45 };
46}