1{
2 lib,
3 bluetooth-data-tools,
4 bluetooth-sensor-state-data,
5 buildPythonPackage,
6 cryptography,
7 fetchFromGitHub,
8 poetry-core,
9 pytest-cov-stub,
10 pytestCheckHook,
11 pythonOlder,
12 pytz,
13 sensor-state-data,
14}:
15
16buildPythonPackage rec {
17 pname = "bthome-ble";
18 version = "3.12.5";
19 pyproject = true;
20
21 disabled = pythonOlder "3.9";
22
23 src = fetchFromGitHub {
24 owner = "Bluetooth-Devices";
25 repo = "bthome-ble";
26 tag = "v${version}";
27 hash = "sha256-SuGmNcx+z/4GOxgAsupY7NW+2ni7vLaAEC3EKn6ctpw=";
28 };
29
30 build-system = [ poetry-core ];
31
32 dependencies = [
33 bluetooth-data-tools
34 bluetooth-sensor-state-data
35 cryptography
36 sensor-state-data
37 pytz
38 ];
39
40 nativeCheckInputs = [
41 pytest-cov-stub
42 pytestCheckHook
43 ];
44
45 pythonImportsCheck = [ "bthome_ble" ];
46
47 meta = with lib; {
48 description = "Library for BThome BLE devices";
49 homepage = "https://github.com/Bluetooth-Devices/bthome-ble";
50 changelog = "https://github.com/bluetooth-devices/bthome-ble/blob/${src.tag}/CHANGELOG.md";
51 license = licenses.mit;
52 maintainers = with maintainers; [ fab ];
53 };
54}