From dfb6de3c2d37f32516f1d3eb88422e9042002445 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 12 Dec 2024 05:06:11 +0100 Subject: [PATCH 1/2] python311Packages.led-ble: 1.0.2 -> 1.1.1 Diff: https://github.com/Bluetooth-Devices/led-ble/compare/refs/tags/v1.0.2...v1.1.1 Changelog: https://github.com/Bluetooth-Devices/led-ble/blob/v1.1.1/CHANGELOG.md --- pkgs/development/python-modules/led-ble/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/led-ble/default.nix b/pkgs/development/python-modules/led-ble/default.nix index 595e353c431b..32a042543453 100644 --- a/pkgs/development/python-modules/led-ble/default.nix +++ b/pkgs/development/python-modules/led-ble/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "led-ble"; - version = "1.0.2"; + version = "1.1.1"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "Bluetooth-Devices"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-4z6SJE/VFNa81ecDal2IEX9adYBrSzco9VfhUPKBj4k="; + hash = "sha256-FPF/jPsXVk16UDpfglmVy01sOpv/XAwx+dCYCbJnFZQ="; }; postPatch = '' From ba112330d5f9be759519c0166f523e34772f64dd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 12 Dec 2024 05:11:05 +0100 Subject: [PATCH 2/2] python312Packages.led-ble: refactor --- .../python-modules/led-ble/default.nix | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/led-ble/default.nix b/pkgs/development/python-modules/led-ble/default.nix index 32a042543453..75816e7ab42c 100644 --- a/pkgs/development/python-modules/led-ble/default.nix +++ b/pkgs/development/python-modules/led-ble/default.nix @@ -1,12 +1,12 @@ { lib, - async-timeout, bleak, bleak-retry-connector, buildPythonPackage, fetchFromGitHub, flux-led, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, }: @@ -14,31 +14,29 @@ buildPythonPackage rec { pname = "led-ble"; version = "1.1.1"; - format = "pyproject"; + pyproject = true; - disabled = pythonOlder "3.9"; + disabled = pythonOlder "3.11"; src = fetchFromGitHub { owner = "Bluetooth-Devices"; - repo = pname; + repo = "led-ble"; rev = "refs/tags/v${version}"; hash = "sha256-FPF/jPsXVk16UDpfglmVy01sOpv/XAwx+dCYCbJnFZQ="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=led_ble --cov-report=term-missing:skip-covered" "" - ''; + build-system = [ poetry-core ]; - nativeBuildInputs = [ poetry-core ]; - - propagatedBuildInputs = [ + dependencies = [ bleak bleak-retry-connector flux-led - ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ]; + ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "led_ble" ];