From d757229b44531cce89e21c05bcee9306710e57b0 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 3 Jun 2026 13:35:44 +0200 Subject: [PATCH] python3Packages.matter-ble-proxy: init at 0.8.0 --- .../matter-ble-proxy/default.nix | 60 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/development/python-modules/matter-ble-proxy/default.nix diff --git a/pkgs/development/python-modules/matter-ble-proxy/default.nix b/pkgs/development/python-modules/matter-ble-proxy/default.nix new file mode 100644 index 000000000000..e683b6a5860a --- /dev/null +++ b/pkgs/development/python-modules/matter-ble-proxy/default.nix @@ -0,0 +1,60 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + setuptools, + aiohttp, + bleak, + pytest-asyncio, + pytest-aiohttp, + pytestCheckHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "matter-ble-proxy"; + version = "0.8.0"; + pyproject = true; + + disabled = pythonOlder "3.12"; + + src = fetchFromGitHub { + owner = "matter-js"; + repo = "matterjs-server"; + tag = "v${finalAttrs.version}"; + hash = "sha256-AjCfPovhYKUeU4Xrsh6uL0pPG+ja0n+efFTbwre83m4="; + }; + + sourceRoot = "${finalAttrs.src.name}/python_ble_proxy"; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'version = "0.0.0"' 'version = "${finalAttrs.version}"' + ''; + + build-system = [ setuptools ]; + + dependencies = [ + aiohttp + bleak + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytest-aiohttp + pytestCheckHook + ]; + + pythonImportsCheck = [ "matter_ble_proxy" ]; + + __structuredAttrs = true; + + meta = { + description = "Client library for the OHF Matter Server BLE proxy protocol"; + homepage = "https://github.com/matter-js/matterjs-server/tree/main/python_ble_proxy"; + changelog = "https://github.com/matter-js/matterjs-server/blob/${finalAttrs.src.tag}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ hexa ]; + mainProgram = "matter-ble-proxy"; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0d1e6d97a265..934d1890bda9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9739,6 +9739,8 @@ self: super: with self; { matrix-nio = callPackage ../development/python-modules/matrix-nio { }; + matter-ble-proxy = callPackage ../development/python-modules/matter-ble-proxy { }; + matter-python-client = callPackage ../development/python-modules/matter-python-client { }; mattermostdriver = callPackage ../development/python-modules/mattermostdriver { };