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/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 ]; diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 51190a33aae..d9827bb1ae0 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" 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 { };