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