From 3b4a2ea585be5ced1fa371bdfc4b37e532eb40c7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Jan 2021 18:54:43 +0100 Subject: [PATCH] python3Packages.python-mystrom: init at 2.0.0 --- .../python-modules/python-mystrom/default.nix | 45 +++++++++++++++++++ .../home-assistant/component-packages.nix | 2 +- pkgs/top-level/python-packages.nix | 2 + 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/python-mystrom/default.nix diff --git a/pkgs/development/python-modules/python-mystrom/default.nix b/pkgs/development/python-modules/python-mystrom/default.nix new file mode 100644 index 000000000000..ccda98b2eb1a --- /dev/null +++ b/pkgs/development/python-modules/python-mystrom/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchPypi +, aiohttp +, click +, requests +, setuptools +}: + +buildPythonPackage rec { + pname = "python-mystrom"; + version = "2.0.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "050dkx29wrmdd8z7pmyk36k2ihpapqi4qmyb70bm6xl5l4jh4k7j"; + }; + + propagatedBuildInputs = [ + aiohttp + click + requests + setuptools + ]; + + # no tests are present + doCheck = false; + + pythonImportsCheck = [ + "pymystrom.bulb" + "pymystrom.pir" + "pymystrom.switch" + ]; + + meta = with lib; { + description = "Python API client for interacting with myStrom devices"; + longDescription = '' + Asynchronous Python API client for interacting with myStrom devices. + There is support for bulbs, motion sensors, plugs and buttons. + ''; + homepage = "https://github.com/home-assistant-ecosystem/python-mystrom"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 93595c5729f1..0e86798ebd4b 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -522,7 +522,7 @@ "mycroft" = ps: with ps; [ ]; # missing inputs: mycroftapi "myq" = ps: with ps; [ ]; # missing inputs: pymyq "mysensors" = ps: with ps; [ aiohttp-cors paho-mqtt ]; # missing inputs: pymysensors - "mystrom" = ps: with ps; [ aiohttp-cors ]; # missing inputs: python-mystrom + "mystrom" = ps: with ps; [ aiohttp-cors python-mystrom ]; "mythicbeastsdns" = ps: with ps; [ ]; # missing inputs: mbddns "n26" = ps: with ps; [ ]; # missing inputs: n26 "nad" = ps: with ps; [ ]; # missing inputs: nad_receiver diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 57458230bb11..fab1cfd49a29 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6025,6 +6025,8 @@ in { python-multipart = callPackage ../development/python-modules/python-multipart { }; + python-mystrom = callPackage ../development/python-modules/python-mystrom { }; + python-nest = callPackage ../development/python-modules/python-nest { }; pythonnet = callPackage