2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
bluetooth-data-tools,
|
|
|
|
bluetooth-sensor-state-data,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
home-assistant-bluetooth,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
sensor-state-data,
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "govee-ble";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "0.31.3";
|
2024-02-07 01:22:34 +00:00
|
|
|
pyproject = true;
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bluetooth-Devices";
|
2024-02-07 01:22:34 +00:00
|
|
|
repo = "govee-ble";
|
2022-09-30 11:47:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-Gb9k2MieRKSJeKpmltL9HYA7pYKTSTWLGDgo52mY6xA=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail " --cov=govee_ble --cov-report=term-missing:skip-covered" ""
|
2024-02-07 01:22:34 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ poetry-core ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2022-09-11 15:47:08 +00:00
|
|
|
bluetooth-data-tools
|
2022-08-12 12:06:08 +00:00
|
|
|
bluetooth-sensor-state-data
|
|
|
|
home-assistant-bluetooth
|
|
|
|
sensor-state-data
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "govee_ble" ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for Govee BLE devices";
|
|
|
|
homepage = "https://github.com/Bluetooth-Devices/govee-ble";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/bluetooth-devices/govee-ble/blob/v${version}/CHANGELOG.md";
|
2022-08-12 12:06:08 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|