From c514b093bca599176061ac7a386564f2066fe1a6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 2 Jan 2023 22:36:43 +0100 Subject: [PATCH 1/2] python310Packages.pykaleidescape: init at 1.0.1 --- .../python-modules/pykaleidescape/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/pykaleidescape/default.nix diff --git a/pkgs/development/python-modules/pykaleidescape/default.nix b/pkgs/development/python-modules/pykaleidescape/default.nix new file mode 100644 index 000000000000..62d65490ff0a --- /dev/null +++ b/pkgs/development/python-modules/pykaleidescape/default.nix @@ -0,0 +1,51 @@ +{ lib +, aiohttp +, buildPythonPackage +, dnspython +, fetchFromGitHub +, pytest-asyncio +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pykaleidescape"; + version = "1.0.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "SteveEasley"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-KM/gtpsQ27QZz2uI1t/yVN5no0zp9LZag1duAJzK55g="; + }; + + propagatedBuildInputs = [ + aiohttp + dnspython + ]; + + checkInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "kaleidescape" + ]; + + disabledTests = [ + # Test requires network access + "test_resolve_succeeds" + ]; + + meta = with lib; { + description = "Module for controlling Kaleidescape devices"; + homepage = "https://github.com/SteveEasley/pykaleidescape"; + changelog = "https://github.com/SteveEasley/pykaleidescape/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5011e5ecb3ff..c8e4f527f86b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8059,6 +8059,8 @@ self: super: with self; { pykakasi = callPackage ../development/python-modules/pykakasi { }; + pykaleidescape = callPackage ../development/python-modules/pykaleidescape { }; + pykdl = callPackage ../development/python-modules/pykdl { }; pykdtree = callPackage ../development/python-modules/pykdtree { From 70aa373a5d46352df1078311e410ddbfc8c5870f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 2 Jan 2023 22:40:07 +0100 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index b72fa929a7db..49aec1939f3d 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -1720,7 +1720,8 @@ "kaiterra" = ps: with ps; [ ]; # missing inputs: kaiterra-async-client "kaleidescape" = ps: with ps; [ - ]; # missing inputs: pykaleidescape + pykaleidescape + ]; "kankun" = ps: with ps; [ ]; "keba" = ps: with ps; [ @@ -4380,6 +4381,7 @@ "jewish_calendar" "juicenet" "justnimbus" + "kaleidescape" "keenetic_ndms2" "kegtron" "keymitt_ble"