From a42d22339f7b795ccd7f7c3696437cfb00dd5601 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 23 Mar 2021 00:08:39 +0100 Subject: [PATCH 1/3] python3Packages.pydeconz: init at 77 --- .../python-modules/pydeconz/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/pydeconz/default.nix diff --git a/pkgs/development/python-modules/pydeconz/default.nix b/pkgs/development/python-modules/pydeconz/default.nix new file mode 100644 index 00000000000..b2cf038f798 --- /dev/null +++ b/pkgs/development/python-modules/pydeconz/default.nix @@ -0,0 +1,41 @@ +{ lib +, aiohttp +, aioresponses +, buildPythonPackage +, fetchFromGitHub +, pytest-asyncio +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pydeconz"; + version = "77"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Kane610"; + repo = "deconz"; + rev = "v${version}"; + sha256 = "0qpipw3si3a23c3nafagfx3zl3v481ha8yakcz1d42mbwsc6hkk4"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + aioresponses + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ "pydeconz" ]; + + meta = with lib; { + description = "Python library wrapping the Deconz REST API"; + homepage = "https://github.com/Kane610/deconz"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d1383da9574..149053326f6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5608,6 +5608,8 @@ in { pydbus = callPackage ../development/python-modules/pydbus { }; + pydeconz = callPackage ../development/python-modules/pydeconz { }; + pydenticon = callPackage ../development/python-modules/pydenticon { }; pydexcom = callPackage ../development/python-modules/pydexcom { }; From 3f2e683ca1798684376ad99b249e7f7628a57424 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 23 Mar 2021 00:10:32 +0100 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 80fc6fbc333..b0ce3170cae 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -151,7 +151,7 @@ "datadog" = ps: with ps; [ datadog ]; "ddwrt" = ps: with ps; [ ]; "debugpy" = ps: with ps; [ debugpy ]; - "deconz" = ps: with ps; [ ]; # missing inputs: pydeconz + "deconz" = ps: with ps; [ pydeconz ]; "decora" = ps: with ps; [ bluepy ]; # missing inputs: decora "decora_wifi" = ps: with ps; [ ]; # missing inputs: decora_wifi "default_config" = ps: with ps; [ pynacl aiohttp-cors async-upnp-client defusedxml distro emoji hass-nabucasa netdisco pillow scapy sqlalchemy zeroconf ]; From b6f41fc3513c6afeb70bf4ff596d9907f5bbc3cb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 23 Mar 2021 00:12:47 +0100 Subject: [PATCH 3/3] home-assistant: enable deconz 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 b2c1c1c8aab..31ba9a2d110 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -193,6 +193,7 @@ in with py.pkgs; buildPythonApplication rec { "conversation" "counter" "cover" + "deconz" "default_config" "demo" "derivative"