1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6
7 # build-system
8 poetry-core,
9 setuptools,
10
11 # dependencies
12 habluetooth,
13
14 # tests
15 bleak,
16 pytest-cov-stub,
17 pytestCheckHook,
18}:
19
20buildPythonPackage rec {
21 pname = "home-assistant-bluetooth";
22 version = "2.0.0";
23 pyproject = true;
24
25 disabled = pythonOlder "3.11";
26
27 src = fetchFromGitHub {
28 owner = "home-assistant-libs";
29 repo = "home-assistant-bluetooth";
30 tag = "v${version}";
31 hash = "sha256-A29Jezj9kQ/v4irvpcpCiZlrNQBQwByrSJOx4HaXTdc=";
32 };
33
34 build-system = [
35 poetry-core
36 setuptools
37 ];
38
39 dependencies = [ habluetooth ];
40
41 doCheck = false; # broken with habluetooth>=4.0
42
43 nativeCheckInputs = [
44 bleak
45 pytest-cov-stub
46 pytestCheckHook
47 ];
48
49 pythonImportsCheck = [ "home_assistant_bluetooth" ];
50
51 meta = {
52 description = "Basic bluetooth models used by Home Assistant";
53 changelog = "https://github.com/home-assistant-libs/home-assistant-bluetooth/blob/${src.tag}/CHANGELOG.md";
54 homepage = "https://github.com/home-assistant-libs/home-assistant-bluetooth";
55 license = lib.licenses.asl20;
56 teams = [ lib.teams.home-assistant ];
57 };
58}