2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
bluetooth-data-tools,
|
|
|
|
bluetooth-sensor-state-data,
|
|
|
|
buildPythonPackage,
|
|
|
|
cryptography,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pytz,
|
|
|
|
sensor-state-data,
|
2022-08-21 13:32:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bthome-ble";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "3.9.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bluetooth-Devices";
|
2023-08-04 22:07:22 +00:00
|
|
|
repo = "bthome-ble";
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-umRPB0eUdFL4kIvqSfbw/Jzh7NZMY6WR4dK+1cyK3EI=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail " --cov=bthome_ble --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [ poetry-core ];
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2022-09-09 14:08:57 +00:00
|
|
|
bluetooth-data-tools
|
2022-08-21 13:32:41 +00:00
|
|
|
bluetooth-sensor-state-data
|
2023-08-04 22:07:22 +00:00
|
|
|
cryptography
|
2022-08-21 13:32:41 +00:00
|
|
|
sensor-state-data
|
2023-07-15 17:15:38 +00:00
|
|
|
pytz
|
2022-08-21 13:32:41 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "bthome_ble" ];
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for BThome BLE devices";
|
|
|
|
homepage = "https://github.com/Bluetooth-Devices/bthome-ble";
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/bluetooth-devices/bthome-ble/blob/v${version}/CHANGELOG.md";
|
2022-08-21 13:32:41 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|