From 1a0e5c95ccbd197b89824a9846a031d6eb00f49d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 13 Jan 2021 15:14:30 +0100 Subject: [PATCH 1/2] python3Packages.aiokef: init at 0.2.17 --- .../python-modules/aiokef/default.nix | 44 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/python-modules/aiokef/default.nix diff --git a/pkgs/development/python-modules/aiokef/default.nix b/pkgs/development/python-modules/aiokef/default.nix new file mode 100644 index 000000000000..c153ff37d8c2 --- /dev/null +++ b/pkgs/development/python-modules/aiokef/default.nix @@ -0,0 +1,44 @@ +{ lib +, async-timeout +, buildPythonPackage +, fetchFromGitHub +, pytest-cov +, pytestCheckHook +, pytest-mypy +, pythonOlder +, tenacity +}: + +buildPythonPackage rec { + pname = "aiokef"; + version = "0.2.17"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "basnijholt"; + repo = pname; + rev = "v${version}"; + sha256 = "0ms0dwrpj80w55svcppbnp7vyl5ipnjfp1c436k5c7pph4q5pxk9"; + }; + + propagatedBuildInputs = [ + async-timeout + tenacity + ]; + + checkInputs = [ + pytest-cov + pytest-mypy + pytestCheckHook + ]; + + pytestFlagsArray = [ "tests" ]; + pythonImportsCheck = [ "aiokef" ]; + + meta = with lib; { + description = "Python API for KEF speakers"; + homepage = "https://github.com/basnijholt/aiokef"; + 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 4c738a3cef9a..91f73c4226ac 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -242,6 +242,8 @@ in { aiokafka = callPackage ../development/python-modules/aiokafka { }; + aiokef = callPackage ../development/python-modules/aiokef { }; + aiolifx = callPackage ../development/python-modules/aiolifx { }; aiolifx-effects = callPackage ../development/python-modules/aiolifx-effects { }; From ea4c52041edf536e88f189189658262176a0761d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 13 Jan 2021 15:16:19 +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 8404d6645e5a..d27b3994b74d 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -413,7 +413,7 @@ "kankun" = ps: with ps; [ ]; "keba" = ps: with ps; [ ]; # missing inputs: keba-kecontact "keenetic_ndms2" = ps: with ps; [ ]; # missing inputs: ndms2_client - "kef" = ps: with ps; [ getmac ]; # missing inputs: aiokef + "kef" = ps: with ps; [ aiokef getmac ]; "keyboard" = ps: with ps; [ ]; # missing inputs: pyuserinput "keyboard_remote" = ps: with ps; [ aionotify evdev ]; "kira" = ps: with ps; [ ]; # missing inputs: pykira