2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, async-timeout
|
2022-10-06 18:32:54 +00:00
|
|
|
, bleak
|
|
|
|
, dbus-fast
|
2022-08-12 12:06:08 +00:00
|
|
|
, myst-parser
|
|
|
|
, pytestCheckHook
|
|
|
|
, sphinxHook
|
|
|
|
, sphinx-rtd-theme
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bluetooth-adapters";
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "0.6.0";
|
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-10-06 18:32:54 +00:00
|
|
|
hash = "sha256-26w7513h5WWGqKz4OqHob42O0bk1yW8ePPKB2V9+AHs=";
|
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 = [
|
|
|
|
async-timeout
|
2022-10-06 18:32:54 +00:00
|
|
|
bleak
|
|
|
|
dbus-fast
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"bluetooth_adapters"
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
changelog = "https://github.com/bluetooth-devices/bluetooth-adapters/blob/main/CHANGELOG.md";
|
|
|
|
description = "Tools to enumerate and find Bluetooth Adapters";
|
|
|
|
homepage = "https://bluetooth-adapters.readthedocs.io/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.home-assistant.members;
|
|
|
|
};
|
|
|
|
}
|