2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
async-timeout,
|
|
|
|
bluetooth-adapters,
|
|
|
|
btsocket,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pyric,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
usb-devices,
|
2022-09-09 14:08:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bluetooth-auto-recovery";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.4.2";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bluetooth-Devices";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "bluetooth-auto-recovery";
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-JaFazXjbHohj4+rPkQA/SaBP0irHrre3vaCqz7T2bwE=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail " --cov=bluetooth_auto_recovery --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ poetry-core ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2022-09-09 14:08:57 +00:00
|
|
|
async-timeout
|
2023-08-04 22:07:22 +00:00
|
|
|
bluetooth-adapters
|
2022-09-09 14:08:57 +00:00
|
|
|
btsocket
|
|
|
|
pyric
|
2022-12-02 08:20:57 +00:00
|
|
|
usb-devices
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "bluetooth_auto_recovery" ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for recovering Bluetooth adapters";
|
|
|
|
homepage = "https://github.com/Bluetooth-Devices/bluetooth-auto-recovery";
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/Bluetooth-Devices/bluetooth-auto-recovery/blob/v${version}/CHANGELOG.md";
|
2022-09-09 14:08:57 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|