depot/third_party/nixpkgs/pkgs/development/python-modules/home-assistant-bluetooth/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

56 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, cython
, poetry-core
, setuptools
, bleak
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "home-assistant-bluetooth";
version = "1.10.0";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "home-assistant-libs";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-g8vdg7YU3rkXW85U4w9Hvb6u9uvoDphbkIlVXchCRxQ=";
};
postPatch = ''
# drop pytest parametrization (coverage, etc.)
sed -i '/addopts/d' pyproject.toml
'';
nativeBuildInputs = [
cython
poetry-core
setuptools
];
propagatedBuildInputs = [
bleak
];
pythonImportsCheck = [
"home_assistant_bluetooth"
];
nativeCheckInputs = [
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;
};
}