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.7.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.9";
18
19 src = fetchFromGitHub {
20 owner = "Bluetooth-Devices";
21 repo = "bluetooth-sensor-state-data";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-Gsg6Gbb+nvrKr7vn9zUuPTPtSjqFJyMk7oLt7LUUn5A=";
24 };
25
26 postPatch = ''
27 substituteInPlace pyproject.toml \
28 --replace-fail " --cov=bluetooth_sensor_state_data --cov-report=term-missing:skip-covered" ""
29 '';
30
31 build-system = [ poetry-core ];
32
33 dependencies = [
34 home-assistant-bluetooth
35 sensor-state-data
36 ];
37
38 nativeCheckInputs = [ pytestCheckHook ];
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 changelog = "https://github.com/Bluetooth-Devices/bluetooth-sensor-state-data/releases/tag/v${version}";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ fab ];
48 };
49}