From 3771fed9b965bac61ab43a7f684509280736efeb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 16 May 2021 01:56:16 +0200 Subject: [PATCH 1/3] python3Packages.ha-philipsjs: init at 2.7.4 --- .../python-modules/ha-philipsjs/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/ha-philipsjs/default.nix diff --git a/pkgs/development/python-modules/ha-philipsjs/default.nix b/pkgs/development/python-modules/ha-philipsjs/default.nix new file mode 100644 index 000000000000..c6de997a1da7 --- /dev/null +++ b/pkgs/development/python-modules/ha-philipsjs/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, cryptography +, fetchFromGitHub +, httpx +, pytest-aiohttp +, pytest-mock +, pytestCheckHook +, pythonOlder +, respx +}: + +buildPythonPackage rec { + pname = "ha-philipsjs"; + version = "2.7.4"; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "danielperna84"; + repo = pname; + rev = version; + sha256 = "08fjdb1q02dwxq8s15ddd00gps64xplblkn8dx5yivldskiy8i1n"; + }; + + propagatedBuildInputs = [ + cryptography + httpx + ]; + + checkInputs = [ + pytest-aiohttp + pytest-mock + pytestCheckHook + respx + ]; + + pythonImportsCheck = [ "haphilipsjs" ]; + + meta = with lib; { + description = "Python library to interact with Philips TVs with jointSPACE API"; + homepage = "https://github.com/danielperna84/ha-philipsjs"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3ecf4494ff4f..338833d0413d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3015,6 +3015,8 @@ in { ha-ffmpeg = callPackage ../development/python-modules/ha-ffmpeg { }; + ha-philipsjs = callPackage ../development/python-modules/ha-philipsjs{ }; + halo = callPackage ../development/python-modules/halo { }; handout = callPackage ../development/python-modules/handout { }; From a377888aebddfec54b18732eb4c654374b4caf1e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 16 May 2021 01:57:15 +0200 Subject: [PATCH 2/3] 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 844ea8976d7c..31eb8a733111 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -626,7 +626,7 @@ "pencom" = ps: with ps; [ ]; # missing inputs: pencompy "persistent_notification" = ps: with ps; [ ]; "person" = ps: with ps; [ aiohttp-cors pillow ]; - "philips_js" = ps: with ps; [ ]; # missing inputs: ha-philipsjs + "philips_js" = ps: with ps; [ ha-philipsjs ]; "pi4ioe5v9xxxx" = ps: with ps; [ ]; # missing inputs: pi4ioe5v9xxxx "pi_hole" = ps: with ps; [ hole ]; "picnic" = ps: with ps; [ python-picnic-api ]; From 32aaf7c6f2ab244819ef4aa71a96080c8db24235 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 16 May 2021 01:58:57 +0200 Subject: [PATCH 3/3] home-assistant: enable philips_js tests --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 7616dc0ee879..d4237c5e448d 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -333,6 +333,7 @@ in with py.pkgs; buildPythonApplication rec { "panel_iframe" "persistent_notification" "person" + "philips_js" "plaato" "plugwise" "prometheus"