2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
2022-12-17 10:02:37 +00:00
|
|
|
, aiohttp
|
2022-08-12 12:06:08 +00:00
|
|
|
, async-timeout
|
2022-10-06 18:32:54 +00:00
|
|
|
, bleak
|
|
|
|
, dbus-fast
|
2022-12-17 10:02:37 +00:00
|
|
|
, mac-vendor-lookup
|
2022-08-12 12:06:08 +00:00
|
|
|
, myst-parser
|
|
|
|
, pytestCheckHook
|
|
|
|
, sphinxHook
|
|
|
|
, sphinx-rtd-theme
|
2022-12-17 10:02:37 +00:00
|
|
|
, usb-devices
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bluetooth-adapters";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.16.1";
|
2022-08-12 12:06:08 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bluetooth-Devices";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-GJhrL6J/L1+tqa7fN5xwE+8IFZZ9kff2g+04H5M7beY=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Drop pytest arguments (coverage, ...)
|
|
|
|
sed -i '/addopts/d' pyproject.toml
|
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"doc"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
myst-parser
|
|
|
|
poetry-core
|
|
|
|
sphinx-rtd-theme
|
|
|
|
sphinxHook
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-12-17 10:02:37 +00:00
|
|
|
aiohttp
|
2022-08-12 12:06:08 +00:00
|
|
|
async-timeout
|
2022-10-06 18:32:54 +00:00
|
|
|
bleak
|
|
|
|
dbus-fast
|
2022-12-17 10:02:37 +00:00
|
|
|
mac-vendor-lookup
|
|
|
|
usb-devices
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"bluetooth_adapters"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tools to enumerate and find Bluetooth Adapters";
|
|
|
|
homepage = "https://bluetooth-adapters.readthedocs.io/";
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/bluetooth-devices/bluetooth-adapters/blob/v${version}/CHANGELOG.md";
|
2022-08-12 12:06:08 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.home-assistant.members;
|
|
|
|
};
|
|
|
|
}
|