2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
cython,
|
|
|
|
poetry-core,
|
|
|
|
setuptools,
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
habluetooth,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
bleak,
|
|
|
|
pytestCheckHook,
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "home-assistant-bluetooth";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.12.2";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "home-assistant-libs";
|
2024-01-13 08:15:51 +00:00
|
|
|
repo = "home-assistant-bluetooth";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-WAsgiOmYqmt/PCKp+vZA2To95YZAgnYCF8ysCn5N9nc=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# drop pytest parametrization (coverage, etc.)
|
|
|
|
sed -i '/addopts/d' pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [
|
2022-12-17 10:02:37 +00:00
|
|
|
cython
|
2022-08-12 12:06:08 +00:00
|
|
|
poetry-core
|
2022-12-17 10:02:37 +00:00
|
|
|
setuptools
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
dependencies = [ habluetooth ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
bleak
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
pythonImportsCheck = [ "home_assistant_bluetooth" ];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Basic bluetooth models used by Home Assistant";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/home-assistant-libs/home-assistant-bluetooth/blob/v${version}/CHANGELOG.md";
|
2022-08-12 12:06:08 +00:00
|
|
|
homepage = "https://github.com/home-assistant-libs/home-assistant-bluetooth";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.home-assistant.members;
|
|
|
|
};
|
|
|
|
}
|