1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, poetry-core 6, aiohttp 7, async-timeout 8, bleak 9, dbus-fast 10, mac-vendor-lookup 11, myst-parser 12, pytestCheckHook 13, sphinxHook 14, sphinx-rtd-theme 15, usb-devices 16}: 17 18buildPythonPackage rec { 19 pname = "bluetooth-adapters"; 20 version = "0.16.1"; 21 format = "pyproject"; 22 23 disabled = pythonOlder "3.9"; 24 25 src = fetchFromGitHub { 26 owner = "Bluetooth-Devices"; 27 repo = pname; 28 rev = "refs/tags/v${version}"; 29 hash = "sha256-GJhrL6J/L1+tqa7fN5xwE+8IFZZ9kff2g+04H5M7beY="; 30 }; 31 32 postPatch = '' 33 # Drop pytest arguments (coverage, ...) 34 sed -i '/addopts/d' pyproject.toml 35 ''; 36 37 outputs = [ 38 "out" 39 "doc" 40 ]; 41 42 nativeBuildInputs = [ 43 myst-parser 44 poetry-core 45 sphinx-rtd-theme 46 sphinxHook 47 ]; 48 49 propagatedBuildInputs = [ 50 aiohttp 51 async-timeout 52 bleak 53 dbus-fast 54 mac-vendor-lookup 55 usb-devices 56 ]; 57 58 pythonImportsCheck = [ 59 "bluetooth_adapters" 60 ]; 61 62 nativeCheckInputs = [ 63 pytestCheckHook 64 ]; 65 66 meta = with lib; { 67 description = "Tools to enumerate and find Bluetooth Adapters"; 68 homepage = "https://bluetooth-adapters.readthedocs.io/"; 69 changelog = "https://github.com/bluetooth-devices/bluetooth-adapters/blob/v${version}/CHANGELOG.md"; 70 license = licenses.asl20; 71 maintainers = teams.home-assistant.members; 72 }; 73}