From d69a27efbfb855fdf0ece2633590e3db95657ea6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 13 Jan 2021 16:04:26 +0100 Subject: [PATCH 1/2] python3Packages.pyinsteon: init at 1.0.8 --- .../python-modules/pyinsteon/default.nix | 60 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/development/python-modules/pyinsteon/default.nix diff --git a/pkgs/development/python-modules/pyinsteon/default.nix b/pkgs/development/python-modules/pyinsteon/default.nix new file mode 100644 index 00000000000..8596883326b --- /dev/null +++ b/pkgs/development/python-modules/pyinsteon/default.nix @@ -0,0 +1,60 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, aiofiles +, aiohttp +, async_generator +, pypubsub +, pyserial +, pyserial-asyncio +, pyyaml +, pytestCheckHook +, pythonOlder +, pytest-cov +, pytest-asyncio +, pytest-timeout +}: + +buildPythonPackage rec { + pname = "pyinsteon"; + version = "1.0.8"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = version; + sha256 = "0d028fcqmdzxp0vsz7digx794s9l65ydsnsyvyx275z6577x7h4h"; + }; + + propagatedBuildInputs = [ + aiofiles + aiohttp + async_generator + pypubsub + pyserial + pyserial-asyncio + pyyaml + ]; + + checkInputs = [ + pytest-asyncio + pytest-cov + pytest-timeout + pytestCheckHook + ]; + + pythonImportsCheck = [ "pyinsteon" ]; + + meta = with lib; { + description = "Python library to support Insteon home automation projects"; + longDescription = '' + This is a Python package to interface with an Insteon Modem. It has been + tested to work with most USB or RS-232 serial based devices such as the + 2413U, 2412S, 2448A7 and Hub models 2242 and 2245. + ''; + homepage = "https://github.com/pyinsteon/pyinsteon"; + 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 4c738a3cef9..58d80455697 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5392,6 +5392,8 @@ in { pyinputevent = callPackage ../development/python-modules/pyinputevent { }; + pyinsteon = callPackage ../development/python-modules/pyinsteon { }; + pyipp = callPackage ../development/python-modules/pyipp { }; pyiqvia = callPackage ../development/python-modules/pyiqvia { }; From 7f0efa178611c73a8d41362d18e98c5a87fae609 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 13 Jan 2021 16:07:18 +0100 Subject: [PATCH 2/2] 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 8404d6645e5..0c372b63317 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -388,7 +388,7 @@ "input_number" = ps: with ps; [ ]; "input_select" = ps: with ps; [ ]; "input_text" = ps: with ps; [ ]; - "insteon" = ps: with ps; [ ]; # missing inputs: pyinsteon + "insteon" = ps: with ps; [ pyinsteon ]; "integration" = ps: with ps; [ ]; "intent" = ps: with ps; [ aiohttp-cors ]; "intent_script" = ps: with ps; [ ];