2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
async-interrupt,
|
|
|
|
bleak,
|
|
|
|
bleak-retry-connector,
|
|
|
|
bluetooth-adapters,
|
|
|
|
bluetooth-auto-recovery,
|
|
|
|
bluetooth-data-tools,
|
|
|
|
buildPythonPackage,
|
|
|
|
cython,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
wheel,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "habluetooth";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "3.1.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bluetooth-Devices";
|
|
|
|
repo = "habluetooth";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-HlQAYR+feu1awKFf11Q5Us4zSeHASu8OscJ8T8tlm5M=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail " --cov=habluetooth --cov-report=term-missing:skip-covered" ""
|
2024-01-02 11:29:13 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
2024-01-02 11:29:13 +00:00
|
|
|
cython
|
|
|
|
poetry-core
|
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
|
|
|
async-interrupt
|
2024-01-02 11:29:13 +00:00
|
|
|
bleak
|
|
|
|
bleak-retry-connector
|
|
|
|
bluetooth-adapters
|
|
|
|
bluetooth-auto-recovery
|
|
|
|
bluetooth-data-tools
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "habluetooth" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for high availability Bluetooth";
|
|
|
|
homepage = "https://github.com/Bluetooth-Devices/habluetooth";
|
|
|
|
changelog = "https://github.com/Bluetooth-Devices/habluetooth/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|