From ce14e055da4565f10a466d10fd6b4a99f47eab0b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 12 Dec 2024 05:53:55 +0100 Subject: [PATCH] python312Packages.xiaomi-ble: refactor --- .../python-modules/xiaomi-ble/default.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/xiaomi-ble/default.nix b/pkgs/development/python-modules/xiaomi-ble/default.nix index 1be46ecf5656..2cf0a8de509d 100644 --- a/pkgs/development/python-modules/xiaomi-ble/default.nix +++ b/pkgs/development/python-modules/xiaomi-ble/default.nix @@ -11,6 +11,7 @@ orjson, poetry-core, pycryptodomex, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -30,14 +31,8 @@ buildPythonPackage rec { hash = "sha256-7/4Ea8IiRPxhgMiazSylYZAmznqIula2yCEUAyIHBBg="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail " --cov=xiaomi_ble --cov-report=term-missing:skip-covered" "" - ''; - build-system = [ poetry-core ]; - pythonRelaxDeps = [ "pycryptodomex" ]; dependencies = [ @@ -52,7 +47,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "xiaomi_ble" ]; @@ -60,7 +58,7 @@ buildPythonPackage rec { description = "Library for Xiaomi BLE devices"; homepage = "https://github.com/Bluetooth-Devices/xiaomi-ble"; changelog = "https://github.com/Bluetooth-Devices/xiaomi-ble/releases/tag/v${version}"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; }