1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 bluetooth-data-tools,
7 bluetooth-sensor-state-data,
8 home-assistant-bluetooth,
9 sensor-state-data,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "sensirion-ble";
15 version = "0.1.1";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "akx";
22 repo = "sensirion-ble";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-VeUfrQ/1Hqs9yueUKcv/ZpCDEEy84VDcZpuTT4fXSGw=";
25 };
26
27 postPatch = ''
28 substituteInPlace pyproject.toml \
29 --replace " --cov=sensirion_ble --cov-report=term-missing:skip-covered" ""
30 '';
31
32 nativeBuildInputs = [ hatchling ];
33
34 propagatedBuildInputs = [
35 bluetooth-data-tools
36 bluetooth-sensor-state-data
37 home-assistant-bluetooth
38 sensor-state-data
39 ];
40
41 pythonImportsCheck = [ "sensirion_ble" ];
42
43 meta = with lib; {
44 description = "Parser for Sensirion BLE devices";
45 homepage = "https://github.com/akx/sensirion-ble";
46 license = licenses.mit;
47 maintainers = with maintainers; [ fab ];
48 };
49}