From 6315b008797fe2fd8d8d44a37008bc5cca77576c Mon Sep 17 00:00:00 2001 From: Matt Votava Date: Sat, 24 Oct 2020 06:12:14 -0700 Subject: [PATCH 1/6] python3Packages.zigpy: 0.22.2 -> 0.26.0, add tests --- .../python-modules/zigpy/default.nix | 46 ++++++++++++++----- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/zigpy/default.nix b/pkgs/development/python-modules/zigpy/default.nix index e85784e51ad..54f0df34016 100644 --- a/pkgs/development/python-modules/zigpy/default.nix +++ b/pkgs/development/python-modules/zigpy/default.nix @@ -1,20 +1,44 @@ -{ stdenv, buildPythonPackage, fetchPypi -, aiohttp, crccheck, pycryptodome, pycrypto, voluptuous -, pytest, pytest-asyncio, asynctest }: +{ lib +, aiohttp +, asynctest +, buildPythonPackage +, crccheck +, fetchFromGitHub +, pycrypto +, pycryptodome +, pytest-aiohttp +, pytest-asyncio +, pytestCheckHook +, tox +, voluptuous }: buildPythonPackage rec { pname = "zigpy"; - version = "0.22.2"; + version = "0.26.0"; - propagatedBuildInputs = [ aiohttp crccheck pycrypto pycryptodome voluptuous ]; - checkInputs = [ pytest pytest-asyncio asynctest ]; - - src = fetchPypi { - inherit pname version; - sha256 = "a43129932c6e4af0d2d57542218faf7695e2424ce18a5a8915d016e1303f5e44"; + src = fetchFromGitHub { + owner = "zigpy"; + repo = "zigpy"; + rev = version; + sha256 = "ba8Ru6RCbFOHhctFtklnrxVD3uEpxF4XDvO5RMgXPBs="; }; - meta = with stdenv.lib; { + propagatedBuildInputs = [ + aiohttp + crccheck + pycrypto + pycryptodome + voluptuous + ]; + + checkInputs = [ + asynctest + pytest-aiohttp + pytest-asyncio + pytestCheckHook + ]; + + meta = with lib; { description = "Library implementing a ZigBee stack"; homepage = "https://github.com/zigpy/zigpy"; license = licenses.gpl3Plus; From f5d94570f3bb3eb0ec5085bd254c037f8a3e9335 Mon Sep 17 00:00:00 2001 From: Matt Votava Date: Sat, 24 Oct 2020 06:53:00 -0700 Subject: [PATCH 2/6] python3Packages.zigpy-cc: 0.5.1 -> 0.5.2, add tests --- .../python-modules/zigpy-cc/default.nix | 46 ++++++++++++++----- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/zigpy-cc/default.nix b/pkgs/development/python-modules/zigpy-cc/default.nix index 76887e39920..79b9d910053 100644 --- a/pkgs/development/python-modules/zigpy-cc/default.nix +++ b/pkgs/development/python-modules/zigpy-cc/default.nix @@ -1,22 +1,44 @@ -{ stdenv, buildPythonPackage, fetchPypi -, pyserial, pyserial-asyncio, zigpy -, asynctest, pytest, pytest-asyncio }: +{ lib +, asynctest +, buildPythonPackage +, fetchFromGitHub +, pyserial +, pyserial-asyncio +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, zigpy }: buildPythonPackage rec { pname = "zigpy-cc"; - version = "0.5.1"; + version = "0.5.2"; + # https://github.com/Martiusweb/asynctest/issues/152 + # broken by upstream python bug with asynctest and + # is used exclusively by home-assistant with python 3.8 + disabled = pythonOlder "3.8"; - propagatedBuildInputs = [ pyserial pyserial-asyncio zigpy ]; - checkInputs = [ asynctest pytest pytest-asyncio ]; - - src = fetchPypi { - inherit pname version; - sha256 = "06759615b28c45beaa5f03e594769a373d41674b96aeafefccd5c4e1c67e25ca"; + src = fetchFromGitHub { + owner = "zigpy"; + repo = "zigpy-cc"; + rev = version; + sha256 = "U3S8tQ3zPlexZDt5GvCd+rOv7CBVeXJJM1NGe7nRl2o="; }; - meta = with stdenv.lib; { + propagatedBuildInputs = [ + pyserial + pyserial-asyncio + zigpy + ]; + + checkInputs = [ + asynctest + pytest-asyncio + pytestCheckHook + ]; + + meta = with lib; { description = "A library which communicates with Texas Instruments CC2531 radios for zigpy"; - homepage = "http://github.com/sanyatuning/zigpy-cc"; + homepage = "https://github.com/zigpy/zigpy-cc"; license = licenses.gpl3Plus; maintainers = with maintainers; [ etu mvnetbiz ]; platforms = platforms.linux; From 871aee2f91e9089ed38d1b5e0306dca6b4831cab Mon Sep 17 00:00:00 2001 From: Matt Votava Date: Sat, 24 Oct 2020 06:57:07 -0700 Subject: [PATCH 3/6] python3Packages.zigpy-xbee: 0.12.1 -> 0.13.0, add tests --- .../python-modules/zigpy-xbee/default.nix | 44 ++++++++++++++----- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/zigpy-xbee/default.nix b/pkgs/development/python-modules/zigpy-xbee/default.nix index 70266644801..697ae5bb92d 100644 --- a/pkgs/development/python-modules/zigpy-xbee/default.nix +++ b/pkgs/development/python-modules/zigpy-xbee/default.nix @@ -1,20 +1,42 @@ -{ stdenv, buildPythonPackage, fetchPypi -, pyserial, pyserial-asyncio, zigpy -, pytest }: +{ lib +, asynctest +, buildPythonPackage +, fetchFromGitHub +, pyserial +, pyserial-asyncio +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, zigpy }: buildPythonPackage rec { pname = "zigpy-xbee"; - version = "0.12.1"; + version = "0.13.0"; + # https://github.com/Martiusweb/asynctest/issues/152 + # broken by upstream python bug with asynctest and + # is used exclusively by home-assistant with python 3.8 + disabled = pythonOlder "3.8"; - buildInputs = [ pyserial pyserial-asyncio zigpy ]; - checkInputs = [ pytest ]; - - src = fetchPypi { - inherit pname version; - sha256 = "09488hl27qjv8shw38iiyzvzwcjkc0k4n00l2bfn1ac443xzw0vh"; + src = fetchFromGitHub { + owner = "zigpy"; + repo = "zigpy-xbee"; + rev = version; + sha256 = "Krdqb9bYKwUC2cdNppB2+tLwWjzmzIHhXnQ1KRduofU="; }; - meta = with stdenv.lib; { + buildInputs = [ + pyserial + pyserial-asyncio + zigpy + ]; + + checkInputs = [ + asynctest + pytest-asyncio + pytestCheckHook + ]; + + meta = with lib; { description = "A library which communicates with XBee radios for zigpy"; homepage = "http://github.com/zigpy/zigpy-xbee"; license = licenses.gpl3Plus; From b9a82c26a3c5674923bca8283e184fd0cbb852ca Mon Sep 17 00:00:00 2001 From: Matt Votava Date: Sat, 24 Oct 2020 06:59:57 -0700 Subject: [PATCH 4/6] python3Packages.zigpy-zigate: 0.6.1 -> 0.6.2, add tests --- .../python-modules/zigpy-zigate/default.nix | 46 ++++++++++++++----- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/zigpy-zigate/default.nix b/pkgs/development/python-modules/zigpy-zigate/default.nix index 43f291841ff..a906ff4f419 100644 --- a/pkgs/development/python-modules/zigpy-zigate/default.nix +++ b/pkgs/development/python-modules/zigpy-zigate/default.nix @@ -1,22 +1,44 @@ -{ stdenv, buildPythonPackage, fetchPypi -, pyserial, pyserial-asyncio, zigpy -, pytest }: +{ lib +, asynctest +, buildPythonPackage +, fetchFromGitHub +, pyserial +, pyserial-asyncio +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, zigpy }: buildPythonPackage rec { pname = "zigpy-zigate"; - version = "0.6.1"; + version = "0.6.2"; + # https://github.com/Martiusweb/asynctest/issues/152 + # broken by upstream python bug with asynctest and + # is used exclusively by home-assistant with python 3.8 + disabled = pythonOlder "3.8"; - buildInputs = [ pyserial pyserial-asyncio zigpy ]; - checkInputs = [ pytest ]; - - src = fetchPypi { - inherit pname version; - sha256 = "0xxqv65drrr96b9ncwsx9ayd369lpwimj1jjb0d7j6l9lil0wmf5"; + src = fetchFromGitHub { + owner = "zigpy"; + repo = "zigpy-zigate"; + rev = version; + sha256 = "EV6DV+BytUcPMtzYVKDnq/Uv2efg3stjL5uVlL62II4="; }; - meta = with stdenv.lib; { + buildInputs = [ + pyserial + pyserial-asyncio + zigpy + ]; + + checkInputs = [ + asynctest + pytest-asyncio + pytestCheckHook + ]; + + meta = with lib; { description = "A library which communicates with ZiGate radios for zigpy"; - homepage = "http://github.com/doudz/zigpy-zigate"; + homepage = "https://github.com/zigpy/zigpy-zigate"; license = licenses.gpl3Plus; maintainers = with maintainers; [ etu mvnetbiz ]; platforms = platforms.linux; From 760e367b6d449403d7c3ae62dc6c819e7c1313a5 Mon Sep 17 00:00:00 2001 From: Matt Votava Date: Sat, 24 Oct 2020 07:26:06 -0700 Subject: [PATCH 5/6] python3Packages.zigpy-znp: init at 0.2.2, add tests --- .../python-modules/zigpy-znp/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/zigpy-znp/default.nix diff --git a/pkgs/development/python-modules/zigpy-znp/default.nix b/pkgs/development/python-modules/zigpy-znp/default.nix new file mode 100644 index 00000000000..7a942a21372 --- /dev/null +++ b/pkgs/development/python-modules/zigpy-znp/default.nix @@ -0,0 +1,55 @@ +{ stdenv +, async-timeout +, asynctest +, buildPythonPackage +, coloredlogs +, coveralls +, fetchFromGitHub +, pyserial +, pyserial-asyncio +, pytest-asyncio +, pytest-mock +, pytest-timeout +, pytestcov +, pytestCheckHook +, voluptuous +, zigpy }: + +buildPythonPackage rec { + pname = "zigpy-znp"; + version = "0.2.2"; + + src = fetchFromGitHub { + owner = "zha-ng"; + repo = "zigpy-znp"; + rev = "v${version}"; + sha256 = "a98RYPvcYE1NPERmPo1jPwMf86N+0297u4pOKuaB6u4="; + }; + + propagatedBuildInputs = [ + async-timeout + coloredlogs + pyserial + pyserial-asyncio + voluptuous + zigpy + ]; + + checkInputs = [ + asynctest + coveralls + pytest-asyncio + pytest-mock + pytest-timeout + pytestcov + pytestCheckHook + ]; + + meta = with stdenv.lib; { + description = "A library for zigpy which communicates with TI ZNP radios"; + homepage = "https://github.com/zha-ng/zigpy-znp"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ mvnetbiz ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ec3fdac387d..c9cbe4133e0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7808,6 +7808,8 @@ in { zigpy-zigate = callPackage ../development/python-modules/zigpy-zigate { }; + zigpy-znp = callPackage ../development/python-modules/zigpy-znp { }; + zimports = callPackage ../development/python-modules/zimports { }; zipfile36 = callPackage ../development/python-modules/zipfile36 { }; From c4e2e9adf81fbcae549d8d96e748c271c5f46de2 Mon Sep 17 00:00:00 2001 From: Matt Votava Date: Sat, 24 Oct 2020 07:26:36 -0700 Subject: [PATCH 6/6] home-assistant: update component-packages.nix --- pkgs/servers/home-assistant/component-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index d6f08ffd918..a55b695b457 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -36,7 +36,7 @@ "apcupsd" = ps: with ps; [ ]; # missing inputs: apcaccess "api" = ps: with ps; [ aiohttp-cors ]; "apns" = ps: with ps; [ ]; # missing inputs: apns2 - "apple_tv" = ps: with ps; [ aiohttp-cors netdisco zeroconf ]; # missing inputs: pyatv + "apple_tv" = ps: with ps; [ aiohttp-cors netdisco pyatv zeroconf ]; "apprise" = ps: with ps; [ apprise ]; "aprs" = ps: with ps; [ ]; # missing inputs: aprslib geopy "aqualogic" = ps: with ps; [ ]; # missing inputs: aqualogic @@ -956,7 +956,7 @@ "zeroconf" = ps: with ps; [ aiohttp-cors zeroconf ]; "zerproc" = ps: with ps; [ ]; # missing inputs: pyzerproc "zestimate" = ps: with ps; [ xmltodict ]; - "zha" = ps: with ps; [ bellows pyserial zha-quirks zigpy-cc zigpy-deconz zigpy-xbee zigpy-zigate zigpy ]; # missing inputs: zigpy-znp + "zha" = ps: with ps; [ bellows pyserial zha-quirks zigpy-cc zigpy-deconz zigpy-xbee zigpy-zigate zigpy-znp zigpy ]; "zhong_hong" = ps: with ps; [ ]; # missing inputs: zhong_hong_hvac "ziggo_mediabox_xl" = ps: with ps; [ ]; # missing inputs: ziggo-mediabox-xl "zodiac" = ps: with ps; [ ];