2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, async-timeout
|
|
|
|
, 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";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "1.0.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}";
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-gDypj2Vud6JtbGREPotvawgcsu5hbf92gJxxutWHcII=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
async-timeout
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|