2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, async-timeout
|
2023-08-04 22:07:22 +00:00
|
|
|
, bluetooth-adapters
|
2022-09-09 14:08:57 +00:00
|
|
|
, btsocket
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pyric
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2022-12-02 08:20:57 +00:00
|
|
|
, usb-devices
|
2022-09-09 14:08:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bluetooth-auto-recovery";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.2.3";
|
2022-09-09 14:08:57 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bluetooth-Devices";
|
|
|
|
repo = pname;
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-1ytiTIAV00Wk2zqZKRAsstVLuyzPEGBISz0g0ssC5Eo=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
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
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov=bluetooth_auto_recovery --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"bluetooth_auto_recovery"
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|