From f29cef3b47516c9534854f8dcbd90847c8804092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 11 Jul 2024 10:51:28 -0700 Subject: [PATCH 1/3] python312Packages.construct-typing: init at 0.6.2 --- .../construct-typing/default.nix | 62 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 64 insertions(+) create mode 100644 pkgs/development/python-modules/construct-typing/default.nix diff --git a/pkgs/development/python-modules/construct-typing/default.nix b/pkgs/development/python-modules/construct-typing/default.nix new file mode 100644 index 000000000000..73123bed0f39 --- /dev/null +++ b/pkgs/development/python-modules/construct-typing/default.nix @@ -0,0 +1,62 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + construct, + typing-extensions, + arrow, + cloudpickle, + numpy, + pytestCheckHook, + ruamel-yaml, +}: + +buildPythonPackage rec { + pname = "construct-typing"; + version = "0.6.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "timrid"; + repo = "construct-typing"; + rev = "refs/tags/v${version}"; + hash = "sha256-zXpxu+VUcepEoAPLQnSlMCZkt8fDsMCLS0HBKhaYD20="; + }; + + build-system = [ setuptools ]; + + pythonRelaxDeps = [ "construct" ]; + + dependencies = [ + construct + typing-extensions + ]; + + pythonImportsCheck = [ + "construct-stubs" + "construct_typed" + ]; + + nativeCheckInputs = [ + arrow + cloudpickle + numpy + pytestCheckHook + ruamel-yaml + ]; + + disabledTests = [ + # tests fail with construct>=2.10.70 + "test_bitsinteger" + "test_bytesinteger" + ]; + + meta = { + changelog = "https://github.com/timrid/construct-typing/releases/tag/v${version}"; + description = "Extension for the python package 'construct' that adds typing features"; + homepage = "https://github.com/timrid/construct-typing"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f764648ae7d6..c21c715f51e4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2487,6 +2487,8 @@ self: super: with self; { construct-classes = callPackage ../development/python-modules/construct-classes { }; + construct-typing = callPackage ../development/python-modules/construct-typing { }; + consul = callPackage ../development/python-modules/consul { }; container-inspector = callPackage ../development/python-modules/container-inspector { }; From 7d25ea49df743f18f60c20f318f9cf1183784cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 11 Jul 2024 10:43:12 -0700 Subject: [PATCH 2/3] python312Packages.eq3btsmart: init at 1.1.9 --- .../python-modules/eq3btsmart/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/eq3btsmart/default.nix diff --git a/pkgs/development/python-modules/eq3btsmart/default.nix b/pkgs/development/python-modules/eq3btsmart/default.nix new file mode 100644 index 000000000000..5fc267fe2e21 --- /dev/null +++ b/pkgs/development/python-modules/eq3btsmart/default.nix @@ -0,0 +1,47 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + bleak, + construct, + construct-typing, + pytest-asyncio, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "eq3btsmart"; + version = "1.1.9"; + pyproject = true; + + src = fetchFromGitHub { + owner = "EuleMitKeule"; + repo = "eq3btsmart"; + rev = "refs/tags/${version}"; + hash = "sha256-7kJqPygX2Oc7fz31qZWrS1ZA+kANZr8vxOwarUzgp/M="; + }; + + build-system = [ poetry-core ]; + + dependencies = [ + bleak + construct + construct-typing + ]; + + pythonImportsCheck = [ "eq3btsmart" ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + meta = { + changelog = "https://github.com/EuleMitKeule/eq3btsmart/releases/tag/${version}"; + description = "Python library that allows interaction with eQ-3 Bluetooth smart thermostats"; + homepage = "https://github.com/EuleMitKeule/eq3btsmart"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c21c715f51e4..914324d07b82 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3930,6 +3930,8 @@ self: super: with self; { epson-projector = callPackage ../development/python-modules/epson-projector { }; + eq3btsmart = callPackage ../development/python-modules/eq3btsmart { }; + equinox = callPackage ../development/python-modules/equinox { }; eradicate = callPackage ../development/python-modules/eradicate { }; From 579a3436204692de9239990c3f1eb14be73bf2aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 11 Jul 2024 11:02:19 -0700 Subject: [PATCH 3/3] home-assistant: support eq3btsmart component --- 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 153e05c0a2ed..0b0ab903e34e 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -1140,6 +1140,7 @@ bluetooth-auto-recovery bluetooth-data-tools dbus-fast + eq3btsmart esphome-dashboard-api fnv-hash-fast ha-ffmpeg @@ -1154,7 +1155,7 @@ sqlalchemy webrtc-noise-gain zeroconf - ]; # missing inputs: eq3btsmart + ]; "escea" = ps: with ps; [ pescea ]; @@ -5400,6 +5401,7 @@ "environment_canada" "epion" "epson" + "eq3btsmart" "escea" "esphome" "eufylife_ble"