depot/third_party/nixpkgs/pkgs/development/python-modules/bleak-retry-connector/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03: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.7.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Bluetooth-Devices";
repo = pname;
rev = "v${version}";
hash = "sha256-ql7j+m8g7ZgkgqJGUVE903n1b73kqWDExgSbnDpKQwc=";
};
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 ];
};
}