1{ lib
2, bleak-retry-connector
3, bluetooth-data-tools
4, bluetooth-sensor-state-data
5, buildPythonPackage
6, fetchFromGitHub
7, home-assistant-bluetooth
8, poetry-core
9, pytestCheckHook
10, pythonOlder
11}:
12
13buildPythonPackage rec {
14 pname = "oralb-ble";
15 version = "0.17.6";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.9";
19
20 src = fetchFromGitHub {
21 owner = "Bluetooth-Devices";
22 repo = pname;
23 rev = "refs/tags/v${version}";
24 hash = "sha256-6LnZ+Y68sl0uA5i764n4fFJnPeo+bAi/xgEvTK6LkXY=";
25 };
26
27 nativeBuildInputs = [
28 poetry-core
29 ];
30
31 propagatedBuildInputs = [
32 bleak-retry-connector
33 bluetooth-data-tools
34 bluetooth-sensor-state-data
35 home-assistant-bluetooth
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 ];
41
42 postPatch = ''
43 substituteInPlace pyproject.toml \
44 --replace " --cov=oralb_ble --cov-report=term-missing:skip-covered" ""
45 '';
46
47 pythonImportsCheck = [
48 "oralb_ble"
49 ];
50
51 meta = with lib; {
52 description = "Library for Oral B BLE devices";
53 homepage = "https://github.com/Bluetooth-Devices/oralb-ble";
54 changelog = "https://github.com/Bluetooth-Devices/oralb-ble/releases/tag/v${version}";
55 license = with licenses; [ mit ];
56 maintainers = with maintainers; [ fab ];
57 };
58}