Files
nixpkgs/pkgs/development/python-modules/bleak/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

61 lines
1.3 KiB
Nix

{
lib,
async-timeout,
bluez,
buildPythonPackage,
dbus-fast,
fetchFromGitHub,
poetry-core,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
typing-extensions,
}:
buildPythonPackage rec {
pname = "bleak";
version = "1.1.1";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "hbldh";
repo = "bleak";
tag = "v${version}";
hash = "sha256-z0Mxr1pUQWNEK01PKMV/CzpW+GeCRcv/+9BADts1FuU=";
};
postPatch = ''
# bleak checks BlueZ's version with a call to `bluetoothctl --version`
substituteInPlace bleak/backends/bluezdbus/version.py \
--replace-fail \"bluetoothctl\" \"${bluez}/bin/bluetoothctl\"
'';
build-system = [ poetry-core ];
dependencies = [
dbus-fast
typing-extensions
]
++ lib.optionals (pythonOlder "3.11") [
async-timeout
];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "bleak" ];
meta = with lib; {
description = "Bluetooth Low Energy platform agnostic client";
homepage = "https://github.com/hbldh/bleak";
changelog = "https://github.com/hbldh/bleak/blob/${src.tag}/CHANGELOG.rst";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ oxzi ];
};
}