1{ 2 lib, 3 async-timeout, 4 bluetooth-adapters, 5 btsocket, 6 buildPythonPackage, 7 fetchFromGitHub, 8 poetry-core, 9 pyric, 10 pytest-asyncio, 11 pytest-cov-stub, 12 pytestCheckHook, 13 pythonOlder, 14 usb-devices, 15}: 16 17buildPythonPackage rec { 18 pname = "bluetooth-auto-recovery"; 19 version = "1.5.3"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.9"; 23 24 src = fetchFromGitHub { 25 owner = "Bluetooth-Devices"; 26 repo = "bluetooth-auto-recovery"; 27 tag = "v${version}"; 28 hash = "sha256-xnEEq3NVScMbMjZWb4lI+kpy2zr6WlXx3XcBhzN1rZ4="; 29 }; 30 31 build-system = [ poetry-core ]; 32 33 dependencies = [ 34 bluetooth-adapters 35 btsocket 36 pyric 37 usb-devices 38 ] 39 ++ lib.optionals (pythonOlder "3.11") [ 40 async-timeout 41 ]; 42 43 nativeCheckInputs = [ 44 pytest-asyncio 45 pytest-cov-stub 46 pytestCheckHook 47 ]; 48 49 pythonImportsCheck = [ "bluetooth_auto_recovery" ]; 50 51 meta = with lib; { 52 description = "Library for recovering Bluetooth adapters"; 53 homepage = "https://github.com/Bluetooth-Devices/bluetooth-auto-recovery"; 54 changelog = "https://github.com/Bluetooth-Devices/bluetooth-auto-recovery/blob/v${version}/CHANGELOG.md"; 55 license = with licenses; [ mit ]; 56 maintainers = with maintainers; [ fab ]; 57 }; 58}