2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
2022-09-11 15:47:08 +00:00
|
|
|
, bluetooth-data-tools
|
2022-08-12 12:06:08 +00:00
|
|
|
, bluetooth-sensor-state-data
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, home-assistant-bluetooth
|
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, sensor-state-data
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "govee-ble";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.27.3";
|
2022-08-12 12:06:08 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bluetooth-Devices";
|
|
|
|
repo = pname;
|
2022-09-30 11:47:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-yMKZe2hEkBm9c/5QuFNQMVPsdHTx9lnEVysRlbntiVY=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
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
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov=govee_ble --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"govee_ble"
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|