1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 requests,
7 paho-mqtt,
8 cryptography,
9}:
10let
11 pname = "tuya-device-sharing-sdk";
12 version = "0.2.0";
13in
14buildPythonPackage {
15 inherit pname version;
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-fu8zh59wlnxtstNbNL8mIm10tiXy22oPbi6oUy5x8c8=";
20 };
21
22 # workaround needed, upstream issue: https://github.com/tuya/tuya-device-sharing-sdk/issues/10
23 postPatch = ''
24 touch requirements.txt
25 '';
26
27 build-system = [ setuptools ];
28
29 dependencies = [
30 requests
31 paho-mqtt
32 cryptography
33 ];
34
35 doCheck = false; # no tests
36
37 meta = with lib; {
38 description = "Tuya Device Sharing SDK";
39 homepage = "https://github.com/tuya/tuya-device-sharing-sdk";
40 license = licenses.mit;
41 maintainers = with maintainers; [ aciceri ];
42 };
43}