1{
2 lib,
3 aiohttp,
4 aiooui,
5 async-timeout,
6 bleak,
7 buildPythonPackage,
8 dbus-fast,
9 fetchFromGitHub,
10 mac-vendor-lookup,
11 myst-parser,
12 poetry-core,
13 pytest-asyncio,
14 pytest-cov-stub,
15 pytestCheckHook,
16 pythonOlder,
17 sphinx-rtd-theme,
18 sphinxHook,
19 uart-devices,
20 usb-devices,
21}:
22
23buildPythonPackage rec {
24 pname = "bluetooth-adapters";
25 version = "0.21.4";
26 pyproject = true;
27
28 disabled = pythonOlder "3.9";
29
30 src = fetchFromGitHub {
31 owner = "Bluetooth-Devices";
32 repo = "bluetooth-adapters";
33 tag = "v${version}";
34 hash = "sha256-JUh4v9YeqMeecJh/eTpmLMwNsxbc/oqZY2CrEJUO418=";
35 };
36
37 outputs = [
38 "out"
39 "doc"
40 ];
41
42 build-system = [
43 myst-parser
44 poetry-core
45 sphinx-rtd-theme
46 sphinxHook
47 ];
48
49 dependencies = [
50 aiohttp
51 aiooui
52 async-timeout
53 bleak
54 dbus-fast
55 mac-vendor-lookup
56 uart-devices
57 usb-devices
58 ];
59
60 nativeCheckInputs = [
61 pytest-asyncio
62 pytest-cov-stub
63 pytestCheckHook
64 ];
65
66 pythonImportsCheck = [ "bluetooth_adapters" ];
67
68 meta = with lib; {
69 description = "Tools to enumerate and find Bluetooth Adapters";
70 homepage = "https://github.com/Bluetooth-Devices/bluetooth-adapters";
71 changelog = "https://github.com/bluetooth-devices/bluetooth-adapters/blob/${src.tag}/CHANGELOG.md";
72 license = licenses.asl20;
73 teams = [ teams.home-assistant ];
74 };
75}