From 90102455fc75cead96bd5f841f5db432e094a408 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 22 Apr 2021 18:11:39 +0200 Subject: [PATCH 1/3] python3Packages.zwave-js-server-python: init at 0.23.1 --- .../zwave-js-server-python/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/zwave-js-server-python/default.nix diff --git a/pkgs/development/python-modules/zwave-js-server-python/default.nix b/pkgs/development/python-modules/zwave-js-server-python/default.nix new file mode 100644 index 000000000000..61dba04a79e1 --- /dev/null +++ b/pkgs/development/python-modules/zwave-js-server-python/default.nix @@ -0,0 +1,40 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, pytest-aiohttp +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "zwave-js-server-python"; + version = "0.23.1"; + disabled = pythonOlder "3.8"; + + + src = fetchFromGitHub { + owner = "home-assistant-libs"; + repo = pname; + rev = version; + sha256 = "0kmmhn357k22ana0ysd8jlz1fyfaqlc8k74ryaik0rrw7nmn1n11"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + pytest-aiohttp + pytestCheckHook + ]; + + pythonImportsCheck = [ "zwave_js_server" ]; + + meta = with lib; { + description = "Python wrapper for zwave-js-server"; + homepage = "https://github.com/home-assistant-libs/zwave-js-server-python"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f22df1c35d93..2ffa7824594d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9380,5 +9380,7 @@ in { zulip = callPackage ../development/python-modules/zulip { }; + zwave-js-server-python = callPackage ../development/python-modules/zwave-js-server-python { }; + zxcvbn = callPackage ../development/python-modules/zxcvbn { }; } From f99c005d6657e36b30d7ab7f7fc3d6966fb58d09 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 22 Apr 2021 18:12:03 +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 4d86e743d151..d900ec7d743c 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -984,6 +984,6 @@ "zone" = ps: with ps; [ ]; "zoneminder" = ps: with ps; [ zm-py ]; "zwave" = ps: with ps; [ aiohttp-cors homeassistant-pyozw paho-mqtt pydispatcher python-openzwave-mqtt ]; - "zwave_js" = ps: with ps; [ aiohttp-cors ]; # missing inputs: zwave-js-server-python + "zwave_js" = ps: with ps; [ aiohttp-cors zwave-js-server-python ]; }; } From 4e1b29994bd5455f6e233e5cba80cf5cd2e36129 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 22 Apr 2021 18:12:20 +0200 Subject: [PATCH 3/3] home-assistant: enable zwave_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 ea9a7f5d150c..caa1e91cd14c 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -381,6 +381,7 @@ in with py.pkgs; buildPythonApplication rec { "zha" "zone" "zwave" + "zwave_js" ]; pytestFlagsArray = [