From 0901882683ba2f8dcce76aa89a190edfb65d0917 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 28 Jul 2022 20:53:51 +0200 Subject: [PATCH] python310Packages.bleak-retry-connector: init at 1.1.0 --- .../bleak-retry-connector/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/bleak-retry-connector/default.nix diff --git a/pkgs/development/python-modules/bleak-retry-connector/default.nix b/pkgs/development/python-modules/bleak-retry-connector/default.nix new file mode 100644 index 000000000000..eea5b8b44777 --- /dev/null +++ b/pkgs/development/python-modules/bleak-retry-connector/default.nix @@ -0,0 +1,48 @@ +{ lib +, bleak +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, pytest-asyncio +}: + +buildPythonPackage rec { + pname = "bleak-retry-connector"; + version = "1.1.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-3d66Kp4bz+ZhiC4ZVJscI5nE+qJdsIaefrC4SM0wGP4="; + }; + + propagatedBuildInputs = [ + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f62c6f49e28d..dfa493883041 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1313,6 +1313,8 @@ in { bleak = callPackage ../development/python-modules/bleak { }; + bleak-retry-connector = callPackage ../development/python-modules/bleak-retry-connector { }; + blebox-uniapi = callPackage ../development/python-modules/blebox-uniapi { }; blessed = callPackage ../development/python-modules/blessed { };