2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
bluetooth-data-tools,
|
|
|
|
bluetooth-sensor-state-data,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
sensor-state-data,
|
2022-09-09 14:08:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "thermobeacon-ble";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.6.2";
|
|
|
|
pyproject = true;
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bluetooth-devices";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "thermobeacon-ble";
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-Nmu9oS6zkCTqk/cf8+fqDFhVcG/2JuDDumGTCubeS5o=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov=thermobeacon_ble --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
bluetooth-data-tools
|
|
|
|
bluetooth-sensor-state-data
|
|
|
|
sensor-state-data
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "thermobeacon_ble" ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for Thermobeacon BLE devices";
|
|
|
|
homepage = "https://github.com/bluetooth-devices/thermobeacon-ble";
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/Bluetooth-Devices/thermobeacon-ble/releases/tag/v${version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|