1{ lib
2, bluetooth-data-tools
3, bluetooth-sensor-state-data
4, buildPythonPackage
5, fetchFromGitHub
6, poetry-core
7, pytestCheckHook
8, pythonOlder
9, sensor-state-data
10}:
11
12buildPythonPackage rec {
13 pname = "thermobeacon-ble";
14 version = "0.6.0";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.9";
18
19 src = fetchFromGitHub {
20 owner = "bluetooth-devices";
21 repo = pname;
22 rev = "refs/tags/v${version}";
23 hash = "sha256-WjABxtZ5td25K9QCbLHisT+DMd2Cv/nljwYwxY2br3A=";
24 };
25
26 nativeBuildInputs = [
27 poetry-core
28 ];
29
30 propagatedBuildInputs = [
31 bluetooth-data-tools
32 bluetooth-sensor-state-data
33 sensor-state-data
34 ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 ];
39
40 postPatch = ''
41 substituteInPlace pyproject.toml \
42 --replace " --cov=thermobeacon_ble --cov-report=term-missing:skip-covered" ""
43 '';
44
45 pythonImportsCheck = [
46 "thermobeacon_ble"
47 ];
48
49 meta = with lib; {
50 description = "Library for Thermobeacon BLE devices";
51 homepage = "https://github.com/bluetooth-devices/thermobeacon-ble";
52 changelog = "https://github.com/Bluetooth-Devices/thermobeacon-ble/releases/tag/v${version}";
53 license = with licenses; [ mit ];
54 maintainers = with maintainers; [ fab ];
55 };
56}