depot/third_party/nixpkgs/pkgs/development/python-modules/bleak-retry-connector/default.nix
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

64 lines
1.4 KiB
Nix

{ lib
, async-timeout
, bleak
, dbus-fast
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytestCheckHook
, pythonOlder
, pytest-asyncio
}:
buildPythonPackage rec {
pname = "bleak-retry-connector";
version = "2.8.5";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Bluetooth-Devices";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-Uct040yI4tJkdQNBAJhr/aOjMRcGkTOAnm4pzmeHNZM=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=bleak_retry_connector --cov-report=term-missing:skip-covered" ""
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
async-timeout
bleak
dbus-fast
];
checkInputs = [
pytest-asyncio
pytestCheckHook
];
disabledTests = [
# broken mocking
"test_establish_connection_can_cache_services_services_missing"
"test_establish_connection_with_dangerous_use_cached_services"
"test_establish_connection_without_dangerous_use_cached_services"
];
pythonImportsCheck = [
"bleak_retry_connector"
];
meta = with lib; {
description = "Connector for Bleak Clients that handles transient connection failures";
homepage = "https://github.com/bluetooth-devices/bleak-retry-connector";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}