From 9d9ecfffb9b9fc2a10c0c558dcd869f331094337 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 27 Feb 2021 10:20:07 +0100 Subject: [PATCH 1/2] python3Packages.pyswitchbot: init at 0.9.1 --- .../python-modules/pyswitchbot/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/pyswitchbot/default.nix diff --git a/pkgs/development/python-modules/pyswitchbot/default.nix b/pkgs/development/python-modules/pyswitchbot/default.nix new file mode 100644 index 00000000000..69bf0114182 --- /dev/null +++ b/pkgs/development/python-modules/pyswitchbot/default.nix @@ -0,0 +1,31 @@ +{ lib +, bluepy +, buildPythonPackage +, fetchFromGitHub +}: + +buildPythonPackage rec { + pname = "pyswitchbot"; + version = "0.9.1"; + + src = fetchFromGitHub { + owner = "Danielhiversen"; + repo = "pySwitchbot"; + rev = version; + sha256 = "16p11fmyms4q93m3rna76nkp2la9m8lmfmaflbvga666vljwfw6v"; + }; + + propagatedBuildInputs = [ bluepy ]; + + # Project has no tests + doCheck = false; + pythonImportsCheck = [ "switchbot" ]; + + meta = with lib; { + description = "Python library to control Switchbot IoT devices"; + homepage = "https://github.com/Danielhiversen/pySwitchbot"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c8229a8c61b..cc3463b38e8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6091,6 +6091,8 @@ in { inherit (pkgs) bash subversion apr aprutil expat neon openssl; }; + pyswitchbot = callPackage ../development/python-modules/pyswitchbot { }; + pysychonaut = callPackage ../development/python-modules/pysychonaut { }; pysyncobj = callPackage ../development/python-modules/pysyncobj { }; From bbd80791e00bae7a8c9ce58231957ea7c8abe58e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 27 Feb 2021 10:21:37 +0100 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index b2427bb69f5..c83168e7c65 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -801,7 +801,7 @@ "swiss_public_transport" = ps: with ps; [ python-opendata-transport ]; "swisscom" = ps: with ps; [ ]; "switch" = ps: with ps; [ ]; - "switchbot" = ps: with ps; [ ]; # missing inputs: PySwitchbot + "switchbot" = ps: with ps; [ pyswitchbot ]; "switcher_kis" = ps: with ps; [ aioswitcher ]; "switchmate" = ps: with ps; [ ]; # missing inputs: pySwitchmate "syncthru" = ps: with ps; [ url-normalize ]; # missing inputs: pysyncthru