python3Packages.bleak: only use async-timeout on Python < 3.11

This commit is contained in:
Robert Schütz
2025-09-14 18:56:56 -07:00
parent a3a245c653
commit b7e115c6c6
@@ -15,9 +15,9 @@
buildPythonPackage rec {
pname = "bleak";
version = "1.0.1";
format = "pyproject";
pyproject = true;
disabled = pythonOlder "3.8";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "hbldh";
@@ -29,15 +29,17 @@ buildPythonPackage rec {
postPatch = ''
# bleak checks BlueZ's version with a call to `bluetoothctl --version`
substituteInPlace bleak/backends/bluezdbus/version.py \
--replace \"bluetoothctl\" \"${bluez}/bin/bluetoothctl\"
--replace-fail \"bluetoothctl\" \"${bluez}/bin/bluetoothctl\"
'';
nativeBuildInputs = [ poetry-core ];
build-system = [ poetry-core ];
propagatedBuildInputs = [
async-timeout
dependencies = [
dbus-fast
typing-extensions
]
++ lib.optionals (pythonOlder "3.11") [
async-timeout
];
nativeCheckInputs = [