From 43b5d35720d81b1d834f9300776aeed0a58d72c1 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 15 Dec 2025 21:50:19 +0000 Subject: [PATCH] python3Packages.bleak: 1.1.1 -> 2.0.0 Diff: https://github.com/hbldh/bleak/compare/v1.1.1...v2.0.0 Changelog: https://github.com/hbldh/bleak/blob/v2.0.0/CHANGELOG.rst --- .../python-modules/bleak/default.nix | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/bleak/default.nix b/pkgs/development/python-modules/bleak/default.nix index 3351fe872a8b..bcdbb0924452 100644 --- a/pkgs/development/python-modules/bleak/default.nix +++ b/pkgs/development/python-modules/bleak/default.nix @@ -1,40 +1,46 @@ { lib, stdenv, - async-timeout, - bluez, buildPythonPackage, - dbus-fast, fetchFromGitHub, - poetry-core, - pytest-asyncio, - pytestCheckHook, + bluez, pythonOlder, - typing-extensions, + + # build-system + poetry-core, + + # dependencies + dbus-fast, pyobjc-core, pyobjc-framework-CoreBluetooth, pyobjc-framework-libdispatch, + typing-extensions, + async-timeout, + + pytest-asyncio, + pytestCheckHook, }: buildPythonPackage rec { pname = "bleak"; - version = "1.1.1"; + version = "2.0.0"; pyproject = true; - disabled = pythonOlder "3.9"; - src = fetchFromGitHub { owner = "hbldh"; repo = "bleak"; tag = "v${version}"; - hash = "sha256-z0Mxr1pUQWNEK01PKMV/CzpW+GeCRcv/+9BADts1FuU="; + hash = "sha256-UrKJoEyLa75HMCOgxmOqJi1z+32buMra+dwVe5qbBds="; }; - postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' + postPatch = # bleak checks BlueZ's version with a call to `bluetoothctl --version` - substituteInPlace bleak/backends/bluezdbus/version.py \ - --replace-fail \"bluetoothctl\" \"${bluez}/bin/bluetoothctl\" - ''; + lib.optionalString stdenv.hostPlatform.isLinux '' + substituteInPlace bleak/backends/bluezdbus/version.py \ + --replace-fail \ + '"bluetoothctl"' \ + '"${lib.getExe' bluez "bluetoothctl"}"' + ''; build-system = [ poetry-core ];