depot/third_party/nixpkgs/pkgs/development/python-modules/bleak-retry-connector/default.nix
Default email 13da32182d Project import generated by Copybara.
GitOrigin-RevId: a7855f2235a1876f97473a76151fec2afa02b287
2022-08-21 15:32:41 +02:00

55 lines
1.1 KiB
Nix

{ lib
, async-timeout
, bleak
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytestCheckHook
, pythonOlder
, pytest-asyncio
}:
buildPythonPackage rec {
pname = "bleak-retry-connector";
version = "1.11.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Bluetooth-Devices";
repo = pname;
rev = "v${version}";
hash = "sha256-I9nXLzy+OmfaQJBTeBSL/yhhrdNnldd42d5QwRDK9Q4=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
async-timeout
bleak
];
checkInputs = [
pytest-asyncio
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=bleak_retry_connector --cov-report=term-missing:skip-covered" ""
'';
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 ];
};
}