1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 home-assistant-bluetooth,
6 poetry-core,
7 pytestCheckHook,
8 pythonOlder,
9 sensor-state-data,
10}:
11
12buildPythonPackage rec {
13 pname = "bluetooth-sensor-state-data";
14 version = "1.6.2";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.9";
18
19 src = fetchFromGitHub {
20 owner = "Bluetooth-Devices";
21 repo = pname;
22 rev = "v${version}";
23 hash = "sha256-NC0l3wbQKz4MVM0kHbXBAUol74ir7V/JQgeYCVuyRs4=";
24 };
25
26 nativeBuildInputs = [ poetry-core ];
27
28 propagatedBuildInputs = [
29 home-assistant-bluetooth
30 sensor-state-data
31 ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 postPatch = ''
36 substituteInPlace pyproject.toml \
37 --replace " --cov=bluetooth_sensor_state_data --cov-report=term-missing:skip-covered" ""
38 '';
39
40 pythonImportsCheck = [ "bluetooth_sensor_state_data" ];
41
42 meta = with lib; {
43 description = "Models for storing and converting Bluetooth Sensor State Data";
44 homepage = "https://github.com/bluetooth-devices/bluetooth-sensor-state-data";
45 license = with licenses; [ asl20 ];
46 maintainers = with maintainers; [ fab ];
47 };
48}