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