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";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "0.15.2";
|
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}";
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-vwcOMg10XRT6wNkQQF6qkbWSG2rsUXaDSEiIevii1eA=";
|
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"
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|