about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrea Ciceri <andrea.ciceri@autistici.org>2024-03-10 12:01:16 +0100
committerAndrea Ciceri <andrea.ciceri@autistici.org>2024-03-10 14:07:06 +0100
commita7016c1016f6a157d28a690c185483fedb0967ce (patch)
tree21121470a2cc7bebfd451809c82ac545b6c9d8b5
parent0e0a57e46ecebf831ea6314b5ac92f1d780e3e66 (diff)
downloadnixlib-a7016c1016f6a157d28a690c185483fedb0967ce.tar
nixlib-a7016c1016f6a157d28a690c185483fedb0967ce.tar.gz
nixlib-a7016c1016f6a157d28a690c185483fedb0967ce.tar.bz2
nixlib-a7016c1016f6a157d28a690c185483fedb0967ce.tar.lz
nixlib-a7016c1016f6a157d28a690c185483fedb0967ce.tar.xz
nixlib-a7016c1016f6a157d28a690c185483fedb0967ce.tar.zst
nixlib-a7016c1016f6a157d28a690c185483fedb0967ce.zip
tuya-device-sharing-sdk: init at 0.2.0
-rw-r--r--pkgs/development/python-modules/tuya-device-sharing-sdk/default.nix44
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/tuya-device-sharing-sdk/default.nix b/pkgs/development/python-modules/tuya-device-sharing-sdk/default.nix
new file mode 100644
index 000000000000..dd95baba855d
--- /dev/null
+++ b/pkgs/development/python-modules/tuya-device-sharing-sdk/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, setuptools
+, requests
+, paho-mqtt
+, cryptography
+}:
+let
+  pname = "tuya-device-sharing-sdk";
+  version = "0.2.0";
+in
+buildPythonPackage {
+  inherit pname version;
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-fu8zh59wlnxtstNbNL8mIm10tiXy22oPbi6oUy5x8c8=";
+  };
+
+  # workaround needed, upstream issue: https://github.com/tuya/tuya-device-sharing-sdk/issues/10
+  postPatch = ''
+    touch requirements.txt
+  '';
+
+  build-system = [
+    setuptools
+  ];
+
+  dependencies = [
+    requests
+    paho-mqtt
+    cryptography
+  ];
+
+  doCheck = false; # no tests
+
+  meta = with lib; {
+    description = "Tuya Device Sharing SDK";
+    homepage = "https://github.com/tuya/tuya-device-sharing-sdk";
+    license = licenses.mit;
+    maintainers = with maintainers; [ aciceri ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 2bdd593bd59a..1fb2ea4e2a18 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -15030,6 +15030,8 @@ self: super: with self; {
 
   turnt = callPackage ../development/python-modules/turnt { };
 
+  tuya-device-sharing-sdk = callPackage ../development/python-modules/tuya-device-sharing-sdk { };
+
   tuya-iot-py-sdk = callPackage ../development/python-modules/tuya-iot-py-sdk { };
 
   tuyaha = callPackage ../development/python-modules/tuyaha { };