fa5436e0a7
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
61 lines
1.2 KiB
Nix
61 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
|
|
# build-system
|
|
cython,
|
|
poetry-core,
|
|
setuptools,
|
|
|
|
# dependencies
|
|
habluetooth,
|
|
|
|
# tests
|
|
bleak,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "home-assistant-bluetooth";
|
|
version = "1.12.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.11";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "home-assistant-libs";
|
|
repo = "home-assistant-bluetooth";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-KTaZ3xbZpBIN5zP73YdJW6QeCQThGdqejnfWwvL+0R8=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# drop pytest parametrization (coverage, etc.)
|
|
sed -i '/addopts/d' pyproject.toml
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
cython
|
|
poetry-core
|
|
setuptools
|
|
];
|
|
|
|
propagatedBuildInputs = [ habluetooth ];
|
|
|
|
pythonImportsCheck = [ "home_assistant_bluetooth" ];
|
|
|
|
nativeCheckInputs = [
|
|
bleak
|
|
pytestCheckHook
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Basic bluetooth models used by Home Assistant";
|
|
changelog = "https://github.com/home-assistant-libs/home-assistant-bluetooth/blob/v${version}/CHANGELOG.md";
|
|
homepage = "https://github.com/home-assistant-libs/home-assistant-bluetooth";
|
|
license = licenses.asl20;
|
|
maintainers = teams.home-assistant.members;
|
|
};
|
|
}
|