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