From ebcac5c0e650376a87ed2a0f98959c31f8697171 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 11:03:34 +0100 Subject: [PATCH 01/35] python312Packages.thermobeacon-ble: refactor --- .../development/python-modules/thermobeacon-ble/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/thermobeacon-ble/default.nix b/pkgs/development/python-modules/thermobeacon-ble/default.nix index d6546fca8153..935fc419ccc5 100644 --- a/pkgs/development/python-modules/thermobeacon-ble/default.nix +++ b/pkgs/development/python-modules/thermobeacon-ble/default.nix @@ -29,9 +29,9 @@ buildPythonPackage rec { --replace " --cov=thermobeacon_ble --cov-report=term-missing:skip-covered" "" ''; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ bluetooth-data-tools bluetooth-sensor-state-data sensor-state-data @@ -45,7 +45,7 @@ buildPythonPackage rec { description = "Library for Thermobeacon BLE devices"; homepage = "https://github.com/bluetooth-devices/thermobeacon-ble"; changelog = "https://github.com/Bluetooth-Devices/thermobeacon-ble/releases/tag/v${version}"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From 5788aba073660d99fb87f4e37268c8f4c29e282b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 11:05:04 +0100 Subject: [PATCH 02/35] python312Packages.thermobeacon-ble: migrate to pytest-cov-stub --- .../python-modules/thermobeacon-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/thermobeacon-ble/default.nix b/pkgs/development/python-modules/thermobeacon-ble/default.nix index 935fc419ccc5..e3ea50474612 100644 --- a/pkgs/development/python-modules/thermobeacon-ble/default.nix +++ b/pkgs/development/python-modules/thermobeacon-ble/default.nix @@ -5,6 +5,7 @@ buildPythonPackage, fetchFromGitHub, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -24,11 +25,6 @@ buildPythonPackage rec { hash = "sha256-XeLTY78zg+5HR+GH9bHl2t86ifcWm7AA4zSwJOknsdc="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=thermobeacon_ble --cov-report=term-missing:skip-covered" "" - ''; - build-system = [ poetry-core ]; dependencies = [ @@ -37,7 +33,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "thermobeacon_ble" ]; From e104c2fc1a29e4a52c5be43f8acd7bbeed71b6d3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 11:11:24 +0100 Subject: [PATCH 03/35] python312Packages.thermopro-ble: refactor --- .../python-modules/thermopro-ble/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/thermopro-ble/default.nix b/pkgs/development/python-modules/thermopro-ble/default.nix index 1308da232617..a3fbf15c4973 100644 --- a/pkgs/development/python-modules/thermopro-ble/default.nix +++ b/pkgs/development/python-modules/thermopro-ble/default.nix @@ -13,20 +13,20 @@ buildPythonPackage rec { pname = "thermopro-ble"; version = "0.10.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "bluetooth-devices"; - repo = pname; + repo = "thermopro-ble"; rev = "refs/tags/v${version}"; hash = "sha256-xaRbp9XLCDGJ0NE0TzJygn2OzqvSFszs97vGHawCkzU="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ bluetooth-data-tools bluetooth-sensor-state-data sensor-state-data @@ -45,7 +45,7 @@ buildPythonPackage rec { description = "Library for Thermopro BLE devices"; homepage = "https://github.com/bluetooth-devices/thermopro-ble"; changelog = "https://github.com/Bluetooth-Devices/thermopro-ble/blob/v${version}/CHANGELOG.md"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From 82b2ac13af0505cc3ec67ffd7eae7b59d0a786ab Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 11:21:02 +0100 Subject: [PATCH 04/35] python312Packages.thermopro-ble: migrate to pytest-cov-stub --- .../python-modules/thermopro-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/thermopro-ble/default.nix b/pkgs/development/python-modules/thermopro-ble/default.nix index a3fbf15c4973..ff83d59a08a3 100644 --- a/pkgs/development/python-modules/thermopro-ble/default.nix +++ b/pkgs/development/python-modules/thermopro-ble/default.nix @@ -5,6 +5,7 @@ buildPythonPackage, fetchFromGitHub, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -32,12 +33,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; - - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=thermopro_ble --cov-report=term-missing:skip-covered" "" - ''; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "thermopro_ble" ]; From e3065e63cefac21daa9cf7f937777507659d90ad Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 11:26:53 +0100 Subject: [PATCH 05/35] python312Pacakges.sensirion-ble: refactor --- pkgs/development/python-modules/sensirion-ble/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/sensirion-ble/default.nix b/pkgs/development/python-modules/sensirion-ble/default.nix index 8dea1faea5e9..460d9bd2b1ad 100644 --- a/pkgs/development/python-modules/sensirion-ble/default.nix +++ b/pkgs/development/python-modules/sensirion-ble/default.nix @@ -13,9 +13,9 @@ buildPythonPackage rec { pname = "sensirion-ble"; version = "0.1.1"; - format = "pyproject"; + pyproject = true; - disabled = pythonOlder "3.8"; + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "akx"; @@ -29,9 +29,9 @@ buildPythonPackage rec { --replace " --cov=sensirion_ble --cov-report=term-missing:skip-covered" "" ''; - nativeBuildInputs = [ hatchling ]; + build-system = [ hatchling ]; - propagatedBuildInputs = [ + dependencies = [ bluetooth-data-tools bluetooth-sensor-state-data home-assistant-bluetooth From dbf39d72a92af8809f7b2db8338ab068b0845396 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 11:32:58 +0100 Subject: [PATCH 06/35] python312Packages.sensirion-ble: enable tests --- .../python-modules/sensirion-ble/default.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/sensirion-ble/default.nix b/pkgs/development/python-modules/sensirion-ble/default.nix index 460d9bd2b1ad..17e583d6b0f0 100644 --- a/pkgs/development/python-modules/sensirion-ble/default.nix +++ b/pkgs/development/python-modules/sensirion-ble/default.nix @@ -1,13 +1,15 @@ { lib, + bluetooth-data-tools, + bluetooth-sensor-state-data, buildPythonPackage, fetchFromGitHub, hatchling, - bluetooth-data-tools, - bluetooth-sensor-state-data, home-assistant-bluetooth, - sensor-state-data, + pytest-cov-stub, + pytestCheckHook, pythonOlder, + sensor-state-data, }: buildPythonPackage rec { @@ -24,11 +26,6 @@ buildPythonPackage rec { hash = "sha256-VeUfrQ/1Hqs9yueUKcv/ZpCDEEy84VDcZpuTT4fXSGw="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=sensirion_ble --cov-report=term-missing:skip-covered" "" - ''; - build-system = [ hatchling ]; dependencies = [ @@ -38,6 +35,11 @@ buildPythonPackage rec { sensor-state-data ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; + pythonImportsCheck = [ "sensirion_ble" ]; meta = with lib; { From 589fe5cdc1d4d677497b1fabbbac26b7c28e237a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 11:43:40 +0100 Subject: [PATCH 07/35] python312Packages.sensorpro-ble: refactor --- .../python-modules/sensorpro-ble/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/sensorpro-ble/default.nix b/pkgs/development/python-modules/sensorpro-ble/default.nix index 4a730bf48d92..6c7c566973cf 100644 --- a/pkgs/development/python-modules/sensorpro-ble/default.nix +++ b/pkgs/development/python-modules/sensorpro-ble/default.nix @@ -13,13 +13,13 @@ buildPythonPackage rec { pname = "sensorpro-ble"; version = "0.5.3"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "Bluetooth-Devices"; - repo = pname; + repo = "sensorpro-ble"; rev = "refs/tags/v${version}"; hash = "sha256-Zqa6qa0Jw79Iu4VEw6KN0GsZcC1X7OpiYUiyT4zwKyY="; }; @@ -29,9 +29,9 @@ buildPythonPackage rec { --replace " --cov=sensorpro_ble --cov-report=term-missing:skip-covered" "" ''; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ bluetooth-data-tools bluetooth-sensor-state-data sensor-state-data @@ -45,7 +45,7 @@ buildPythonPackage rec { description = "Library for Sensorpro BLE devices"; homepage = "https://github.com/Bluetooth-Devices/sensorpro-ble"; changelog = "https://github.com/Bluetooth-Devices/sensorpro-ble/blob/v${version}/CHANGELOG.md"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From bc826287eff595492703bb2a0c66e029391a612f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 11:45:46 +0100 Subject: [PATCH 08/35] python312Packages.sensirion-ble: migrate to pytest-cov-stub --- .../python-modules/sensorpro-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/sensorpro-ble/default.nix b/pkgs/development/python-modules/sensorpro-ble/default.nix index 6c7c566973cf..edf61cf40ef8 100644 --- a/pkgs/development/python-modules/sensorpro-ble/default.nix +++ b/pkgs/development/python-modules/sensorpro-ble/default.nix @@ -5,6 +5,7 @@ buildPythonPackage, fetchFromGitHub, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -24,11 +25,6 @@ buildPythonPackage rec { hash = "sha256-Zqa6qa0Jw79Iu4VEw6KN0GsZcC1X7OpiYUiyT4zwKyY="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=sensorpro_ble --cov-report=term-missing:skip-covered" "" - ''; - build-system = [ poetry-core ]; dependencies = [ @@ -37,7 +33,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "sensorpro_ble" ]; From bf389406c821c8068510901aa0b77649f84c31da Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 11:49:06 +0100 Subject: [PATCH 09/35] python312Packages.ruuvitag-ble: refactor --- .../python-modules/ruuvitag-ble/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/ruuvitag-ble/default.nix b/pkgs/development/python-modules/ruuvitag-ble/default.nix index 629e3c539954..98a62ee95fb7 100644 --- a/pkgs/development/python-modules/ruuvitag-ble/default.nix +++ b/pkgs/development/python-modules/ruuvitag-ble/default.nix @@ -14,20 +14,20 @@ buildPythonPackage rec { pname = "ruuvitag-ble"; version = "0.1.2"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "Bluetooth-Devices"; - repo = pname; + repo = "ruuvitag-ble"; rev = "refs/tags/v${version}"; hash = "sha256-J+807p2mE+VZ0oqldFtjdcNGsRTkAU54s6byQSGrng4="; }; - nativeBuildInputs = [ hatchling ]; + build-system = [ hatchling ]; - propagatedBuildInputs = [ + dependencies = [ bluetooth-data-tools bluetooth-sensor-state-data home-assistant-bluetooth @@ -46,7 +46,7 @@ buildPythonPackage rec { meta = with lib; { description = "Library for Ruuvitag BLE devices"; homepage = "https://github.com/Bluetooth-Devices/ruuvitag-ble"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From f8b6887e5003cfa7076aa46d24a37588363237dc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 11:55:04 +0100 Subject: [PATCH 10/35] python312Packages.ruuvitag-ble: migrate to pytest-cov-stub --- .../python-modules/ruuvitag-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/ruuvitag-ble/default.nix b/pkgs/development/python-modules/ruuvitag-ble/default.nix index 98a62ee95fb7..3727519c563f 100644 --- a/pkgs/development/python-modules/ruuvitag-ble/default.nix +++ b/pkgs/development/python-modules/ruuvitag-ble/default.nix @@ -6,6 +6,7 @@ fetchFromGitHub, hatchling, home-assistant-bluetooth, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -34,12 +35,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; - - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=ruuvitag_ble --cov-report=term-missing:skip-covered" "" - ''; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "ruuvitag_ble" ]; From e11fe5a933c21746951e9cfd9e27204adeb77962 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 11:59:20 +0100 Subject: [PATCH 11/35] python312Packages.bluemaestro-ble: refactor --- .../python-modules/bluemaestro-ble/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/bluemaestro-ble/default.nix b/pkgs/development/python-modules/bluemaestro-ble/default.nix index d1f8cbd91264..0abea089d86e 100644 --- a/pkgs/development/python-modules/bluemaestro-ble/default.nix +++ b/pkgs/development/python-modules/bluemaestro-ble/default.nix @@ -13,20 +13,20 @@ buildPythonPackage rec { pname = "bluemaestro-ble"; version = "0.2.3"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "Bluetooth-Devices"; - repo = pname; + repo = "bluemaestro-ble"; rev = "refs/tags/v${version}"; hash = "sha256-mJ5JNGN4F9U3WMJQDwiZwuxE0zOirwo1sWF3/bVwXhY="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ bluetooth-data-tools bluetooth-sensor-state-data sensor-state-data @@ -45,7 +45,7 @@ buildPythonPackage rec { description = "Library for bluemaestro BLE devices"; homepage = "https://github.com/Bluetooth-Devices/bluemaestro-ble"; changelog = "https://github.com/Bluetooth-Devices/bluemaestro-ble/blob/v${version}/CHANGELOG.md"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From 66fd6878e3606379a4a36fdce2a2ced48dbab4ad Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 12:08:14 +0100 Subject: [PATCH 12/35] python312Packages.bluemaestro-ble: migrate to pytest-cov-stub --- .../python-modules/bluemaestro-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/bluemaestro-ble/default.nix b/pkgs/development/python-modules/bluemaestro-ble/default.nix index 0abea089d86e..d153c721f7aa 100644 --- a/pkgs/development/python-modules/bluemaestro-ble/default.nix +++ b/pkgs/development/python-modules/bluemaestro-ble/default.nix @@ -5,6 +5,7 @@ buildPythonPackage, fetchFromGitHub, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -32,12 +33,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; - - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=bluemaestro_ble --cov-report=term-missing:skip-covered" "" - ''; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "bluemaestro_ble" ]; From f79b3ad0b7e0a6ab035c60d4548fd9a1a917fc85 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 12:15:32 +0100 Subject: [PATCH 13/35] python312Packages.tilt-ble: refactor --- pkgs/development/python-modules/tilt-ble/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/tilt-ble/default.nix b/pkgs/development/python-modules/tilt-ble/default.nix index 11c8961308b7..c4e54d06e101 100644 --- a/pkgs/development/python-modules/tilt-ble/default.nix +++ b/pkgs/development/python-modules/tilt-ble/default.nix @@ -13,20 +13,20 @@ buildPythonPackage rec { pname = "tilt-ble"; version = "0.2.4"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "Bluetooth-Devices"; - repo = pname; + repo = "tilt-ble"; rev = "refs/tags/v${version}"; hash = "sha256-ok9XWx47hcke535480NORfS1pSagaOJvMR48lYTa/Tg="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ bluetooth-sensor-state-data home-assistant-bluetooth sensor-state-data @@ -45,7 +45,7 @@ buildPythonPackage rec { description = "Library for Tilt BLE devices"; homepage = "https://github.com/Bluetooth-Devices/tilt-ble"; changelog = "https://github.com/Bluetooth-Devices/tilt-ble/releases/tag/v${version}"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From 54beae6be30716961d82bc7863b2e62436a24aee Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 12:16:56 +0100 Subject: [PATCH 14/35] python312Packages.tilt-ble: migrate to pytest-cov-stub --- pkgs/development/python-modules/tilt-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/tilt-ble/default.nix b/pkgs/development/python-modules/tilt-ble/default.nix index c4e54d06e101..4f9813e806e9 100644 --- a/pkgs/development/python-modules/tilt-ble/default.nix +++ b/pkgs/development/python-modules/tilt-ble/default.nix @@ -5,6 +5,7 @@ fetchFromGitHub, home-assistant-bluetooth, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -32,12 +33,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; - - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=tilt_ble --cov-report=term-missing:skip-covered" "" - ''; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "tilt_ble" ]; From e63d48968fd1a9de7ca61c89de12fe355dc6cc4d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 12:18:52 +0100 Subject: [PATCH 15/35] python312Packages.oralb-ble: refactor --- pkgs/development/python-modules/oralb-ble/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/oralb-ble/default.nix b/pkgs/development/python-modules/oralb-ble/default.nix index 11eba7e06ab1..8a8b82ff9ef3 100644 --- a/pkgs/development/python-modules/oralb-ble/default.nix +++ b/pkgs/development/python-modules/oralb-ble/default.nix @@ -32,9 +32,9 @@ buildPythonPackage rec { --replace-fail " --cov=oralb_ble --cov-report=term-missing:skip-covered" "" ''; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ bleak bleak-retry-connector bluetooth-data-tools @@ -58,7 +58,7 @@ buildPythonPackage rec { description = "Library for Oral B BLE devices"; homepage = "https://github.com/Bluetooth-Devices/oralb-ble"; changelog = "https://github.com/Bluetooth-Devices/oralb-ble/releases/tag/v${version}"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From bcb8ca139a5d92cfe0d0c8271eafc7a3f275225b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 12:20:01 +0100 Subject: [PATCH 16/35] python312Packages.oralb-ble: migrate to pytest-cov-stub --- pkgs/development/python-modules/oralb-ble/default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/oralb-ble/default.nix b/pkgs/development/python-modules/oralb-ble/default.nix index 8a8b82ff9ef3..22498f872d6d 100644 --- a/pkgs/development/python-modules/oralb-ble/default.nix +++ b/pkgs/development/python-modules/oralb-ble/default.nix @@ -9,6 +9,7 @@ home-assistant-bluetooth, poetry-core, pytest-asyncio, + pytest-cov-stub, pytestCheckHook, pythonOlder, }: @@ -27,11 +28,6 @@ buildPythonPackage rec { hash = "sha256-e6L8HXpqOAHnEktIJ1N1atC5QXno669W3c/S7cISa48="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail " --cov=oralb_ble --cov-report=term-missing:skip-covered" "" - ''; - build-system = [ poetry-core ]; dependencies = [ @@ -44,6 +40,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytest-asyncio + pytest-cov-stub pytestCheckHook ]; From 74bd4b9fe610b4120dcc0714c3d4378d1992ccc9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 12:22:21 +0100 Subject: [PATCH 17/35] python312Packages.govee-ble: migrate to pytest-cov-stub --- pkgs/development/python-modules/govee-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/govee-ble/default.nix b/pkgs/development/python-modules/govee-ble/default.nix index 840c0d0ae65f..49ceb0c1d124 100644 --- a/pkgs/development/python-modules/govee-ble/default.nix +++ b/pkgs/development/python-modules/govee-ble/default.nix @@ -6,6 +6,7 @@ fetchFromGitHub, home-assistant-bluetooth, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -25,11 +26,6 @@ buildPythonPackage rec { hash = "sha256-w21paR1VTV/ZFnl9SKkJmFFDZMPgA3d7P6blceVvnVk="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail " --cov=govee_ble --cov-report=term-missing:skip-covered" "" - ''; - build-system = [ poetry-core ]; dependencies = [ @@ -39,7 +35,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "govee_ble" ]; From fa0c52f825ab1edcb81ee0a3bb8b21d4bec6842c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 12:24:04 +0100 Subject: [PATCH 18/35] python312Packages.bthome-ble: migrate to pytest-cov-stub --- .../development/python-modules/bthome-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/bthome-ble/default.nix b/pkgs/development/python-modules/bthome-ble/default.nix index 8f48d2c0364d..93433f5e53e3 100644 --- a/pkgs/development/python-modules/bthome-ble/default.nix +++ b/pkgs/development/python-modules/bthome-ble/default.nix @@ -6,6 +6,7 @@ cryptography, fetchFromGitHub, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, pytz, @@ -26,11 +27,6 @@ buildPythonPackage rec { hash = "sha256-TlZyNGfHNKN+6tCKepLS+fbgfq3a1uzeCXl25khl6d8="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail " --cov=bthome_ble --cov-report=term-missing:skip-covered" "" - ''; - build-system = [ poetry-core ]; dependencies = [ @@ -41,7 +37,10 @@ buildPythonPackage rec { pytz ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "bthome_ble" ]; From 80a2776b8480736f549aba95008c60054daf2e74 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 12:26:08 +0100 Subject: [PATCH 19/35] python312Packages.ibeacon-ble: refactor --- pkgs/development/python-modules/ibeacon-ble/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/ibeacon-ble/default.nix b/pkgs/development/python-modules/ibeacon-ble/default.nix index e0f9fc682355..ae19cb564811 100644 --- a/pkgs/development/python-modules/ibeacon-ble/default.nix +++ b/pkgs/development/python-modules/ibeacon-ble/default.nix @@ -30,9 +30,9 @@ buildPythonPackage rec { --replace-fail " --cov=ibeacon_ble --cov-report=term-missing:skip-covered" "" ''; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ aiohttp aiooui home-assistant-bluetooth @@ -47,7 +47,7 @@ buildPythonPackage rec { description = "Library for iBeacon BLE devices"; homepage = "https://github.com/Bluetooth-Devices/ibeacon-ble"; changelog = "https://github.com/Bluetooth-Devices/ibeacon-ble/blob/v${version}/CHANGELOG.md"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From 50276b6b5421bb2cd618e674816234817b4fe2cc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 12:27:40 +0100 Subject: [PATCH 20/35] python312Packages.ibeacon-ble: migrate to pytest-cov-stub --- .../python-modules/ibeacon-ble/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/ibeacon-ble/default.nix b/pkgs/development/python-modules/ibeacon-ble/default.nix index ae19cb564811..732fe41c4efa 100644 --- a/pkgs/development/python-modules/ibeacon-ble/default.nix +++ b/pkgs/development/python-modules/ibeacon-ble/default.nix @@ -7,6 +7,8 @@ home-assistant-bluetooth, mac-vendor-lookup, poetry-core, + pytest-asyncio, + pytest-cov-stub, pytestCheckHook, pythonOlder, }: @@ -25,11 +27,6 @@ buildPythonPackage rec { hash = "sha256-1liSWxduYpjIMu7226EH4bsc7gca5g/fyL79W4ZMdU4="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail " --cov=ibeacon_ble --cov-report=term-missing:skip-covered" "" - ''; - build-system = [ poetry-core ]; dependencies = [ @@ -39,7 +36,11 @@ buildPythonPackage rec { mac-vendor-lookup ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-asyncio + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "ibeacon_ble" ]; From 823bcb4b3fd97fc5345a44dae36a2e3d6eb5ee87 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 12:30:07 +0100 Subject: [PATCH 21/35] python312Packages.inkbird-ble: refactor --- .../development/python-modules/inkbird-ble/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/inkbird-ble/default.nix b/pkgs/development/python-modules/inkbird-ble/default.nix index 4722aa190241..83eb6790aaed 100644 --- a/pkgs/development/python-modules/inkbird-ble/default.nix +++ b/pkgs/development/python-modules/inkbird-ble/default.nix @@ -14,20 +14,20 @@ buildPythonPackage rec { pname = "inkbird-ble"; version = "0.5.8"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "Bluetooth-Devices"; - repo = pname; + repo = "inkbird-ble"; rev = "refs/tags/v${version}"; hash = "sha256-cUqU4XaY7CORhzy0AGjXI5c5ka+PnF4cHdyopyEBcLo="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ bluetooth-data-tools bluetooth-sensor-state-data home-assistant-bluetooth @@ -47,7 +47,7 @@ buildPythonPackage rec { description = "Library for Inkbird BLE devices"; homepage = "https://github.com/Bluetooth-Devices/inkbird-ble"; changelog = "https://github.com/Bluetooth-Devices/inkbird-ble/blob/v${version}/CHANGELOG.md"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From 6207343004adfa0eb8793c4a59ffd67fbbf33f69 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 12:51:05 +0100 Subject: [PATCH 22/35] python312Packages.inkbird-ble: migrate to pytest-cov-stub --- .../python-modules/inkbird-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/inkbird-ble/default.nix b/pkgs/development/python-modules/inkbird-ble/default.nix index 83eb6790aaed..9d2979024029 100644 --- a/pkgs/development/python-modules/inkbird-ble/default.nix +++ b/pkgs/development/python-modules/inkbird-ble/default.nix @@ -6,6 +6,7 @@ fetchFromGitHub, home-assistant-bluetooth, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -34,12 +35,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; - - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=inkbird_ble --cov-report=term-missing:skip-covered" "" - ''; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "inkbird_ble" ]; From 27cfd31dfbda683df76d5c5d18155bf692146d14 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 12:53:56 +0100 Subject: [PATCH 23/35] python312Packages.kegtron-ble: refactor --- .../development/python-modules/kegtron-ble/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/kegtron-ble/default.nix b/pkgs/development/python-modules/kegtron-ble/default.nix index 5d1928741b70..87670f77ead7 100644 --- a/pkgs/development/python-modules/kegtron-ble/default.nix +++ b/pkgs/development/python-modules/kegtron-ble/default.nix @@ -13,20 +13,20 @@ buildPythonPackage rec { pname = "kegtron-ble"; version = "0.4.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "Bluetooth-Devices"; - repo = pname; + repo = "kegtron-ble"; rev = "refs/tags/v${version}"; hash = "sha256-O5I5shW8nL2RAQptS2Bp/GI/4L6o0xXXmwYvRq0MM8o="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ bluetooth-data-tools bluetooth-sensor-state-data sensor-state-data @@ -45,7 +45,7 @@ buildPythonPackage rec { description = "Library for Kegtron BLE devices"; homepage = "https://github.com/Bluetooth-Devices/kegtron-ble"; changelog = "https://github.com/Bluetooth-Devices/kegtron-ble/blob/v${version}/CHANGELOG.md"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From ada42a81feba0c07c75ecf4ad42c2261c117726c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 12:56:45 +0100 Subject: [PATCH 24/35] python312Packages.kegtron-ble: migrate to pytest-cov-stub --- .../python-modules/kegtron-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/kegtron-ble/default.nix b/pkgs/development/python-modules/kegtron-ble/default.nix index 87670f77ead7..add192df0ade 100644 --- a/pkgs/development/python-modules/kegtron-ble/default.nix +++ b/pkgs/development/python-modules/kegtron-ble/default.nix @@ -5,6 +5,7 @@ buildPythonPackage, fetchFromGitHub, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -32,12 +33,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; - - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=kegtron_ble --cov-report=term-missing:skip-covered" "" - ''; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "kegtron_ble" ]; From a20970d8a2c6eddaccb14ec1c403584619c65ad5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 13:00:11 +0100 Subject: [PATCH 25/35] python312Packages.qingping-ble: refactor --- .../python-modules/qingping-ble/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/qingping-ble/default.nix b/pkgs/development/python-modules/qingping-ble/default.nix index 949ebbd187b8..127cba70bca2 100644 --- a/pkgs/development/python-modules/qingping-ble/default.nix +++ b/pkgs/development/python-modules/qingping-ble/default.nix @@ -13,20 +13,20 @@ buildPythonPackage rec { pname = "qingping-ble"; version = "0.10.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "bluetooth-devices"; - repo = pname; + repo = "qingping-ble"; rev = "refs/tags/v${version}"; hash = "sha256-5w3KGJLdHFv6kURKTz3YImZNjaETiVqbbJTJpBSLSo8="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ bluetooth-data-tools bluetooth-sensor-state-data sensor-state-data @@ -45,7 +45,7 @@ buildPythonPackage rec { description = "Library for Qingping BLE devices"; homepage = "https://github.com/bluetooth-devices/qingping-ble"; changelog = "https://github.com/Bluetooth-Devices/qingping-ble/blob/v${version}/CHANGELOG.md"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From 9af4e2056a81ed726f4c467d2863c8d9a3be94ed Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 13:03:23 +0100 Subject: [PATCH 26/35] python312Packages.qingping-ble: migrate to pytest-cov-stub --- .../python-modules/qingping-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/qingping-ble/default.nix b/pkgs/development/python-modules/qingping-ble/default.nix index 127cba70bca2..6ee88b655f6f 100644 --- a/pkgs/development/python-modules/qingping-ble/default.nix +++ b/pkgs/development/python-modules/qingping-ble/default.nix @@ -5,6 +5,7 @@ buildPythonPackage, fetchFromGitHub, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -32,12 +33,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; - - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=qingping_ble --cov-report=term-missing:skip-covered" "" - ''; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "qingping_ble" ]; From 53de9d53cb20a4058d2c43b5fe9228b6a842c196 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 13:05:49 +0100 Subject: [PATCH 27/35] python312Packages.rapt-ble: refactor --- pkgs/development/python-modules/rapt-ble/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/rapt-ble/default.nix b/pkgs/development/python-modules/rapt-ble/default.nix index a72e0f68d657..dc0d719620e7 100644 --- a/pkgs/development/python-modules/rapt-ble/default.nix +++ b/pkgs/development/python-modules/rapt-ble/default.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "rapt-ble"; version = "0.1.2"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "sairon"; - repo = pname; + repo = "rapt-ble"; rev = "refs/tags/v${version}"; hash = "sha256-ozZwVgTV/xYl1nXLiybcPs6DQKocNdbxTEYDfYyQuvY="; }; @@ -30,9 +30,9 @@ buildPythonPackage rec { --replace " --cov=rapt_ble --cov-report=term-missing:skip-covered" "" ''; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ bluetooth-data-tools bluetooth-sensor-state-data home-assistant-bluetooth @@ -47,7 +47,7 @@ buildPythonPackage rec { description = "Library for RAPT Pill hydrometer BLE devices"; homepage = "https://github.com/sairon/rapt-ble"; changelog = "https://github.com/sairon/rapt-ble/blob/v${version}/CHANGELOG.md"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From 06bb2b8cd243bad0f52140df61db1a167fc80257 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 13:07:34 +0100 Subject: [PATCH 28/35] python312Packages.rapt-ble: migrate to pytest-cov-stub --- pkgs/development/python-modules/rapt-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/rapt-ble/default.nix b/pkgs/development/python-modules/rapt-ble/default.nix index dc0d719620e7..488d4318278b 100644 --- a/pkgs/development/python-modules/rapt-ble/default.nix +++ b/pkgs/development/python-modules/rapt-ble/default.nix @@ -6,6 +6,7 @@ fetchFromGitHub, home-assistant-bluetooth, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -25,11 +26,6 @@ buildPythonPackage rec { hash = "sha256-ozZwVgTV/xYl1nXLiybcPs6DQKocNdbxTEYDfYyQuvY="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=rapt_ble --cov-report=term-missing:skip-covered" "" - ''; - build-system = [ poetry-core ]; dependencies = [ @@ -39,7 +35,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "rapt_ble" ]; From 9650c6720641add9329eca868a89e6caf37204dc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 13:11:20 +0100 Subject: [PATCH 29/35] python312Packages.ld2410-ble: refactor --- pkgs/development/python-modules/ld2410-ble/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/ld2410-ble/default.nix b/pkgs/development/python-modules/ld2410-ble/default.nix index b680db42a4d9..183bff598a2e 100644 --- a/pkgs/development/python-modules/ld2410-ble/default.nix +++ b/pkgs/development/python-modules/ld2410-ble/default.nix @@ -13,13 +13,13 @@ buildPythonPackage rec { pname = "ld2410-ble"; version = "0.2.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "930913"; - repo = pname; + repo = "ld2410-ble"; rev = "refs/tags/v${version}"; hash = "sha256-wQnE2hNT0UOnPJbHq1eayIO8g0XRZvEH6V19DL6RqoA="; }; @@ -29,9 +29,9 @@ buildPythonPackage rec { --replace " --cov=ld2410_ble --cov-report=term-missing:skip-covered" "" ''; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ async-timeout bleak bleak-retry-connector @@ -45,7 +45,7 @@ buildPythonPackage rec { description = "Library for the LD2410B modules from HiLinks"; homepage = "https://github.com/930913/ld2410-ble"; changelog = "https://github.com/930913/ld2410-ble/blob/v${version}/CHANGELOG.md"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From 162eb6d3af4b5bee6545293b975afee3089dbf9c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 13:12:36 +0100 Subject: [PATCH 30/35] python312Packages.ld2410-ble: migrate to pytest-cov-stub --- .../python-modules/ld2410-ble/default.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/ld2410-ble/default.nix b/pkgs/development/python-modules/ld2410-ble/default.nix index 183bff598a2e..a811cdb3171a 100644 --- a/pkgs/development/python-modules/ld2410-ble/default.nix +++ b/pkgs/development/python-modules/ld2410-ble/default.nix @@ -1,11 +1,12 @@ { lib, async-timeout, - bleak, bleak-retry-connector, + bleak, buildPythonPackage, fetchFromGitHub, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, }: @@ -24,11 +25,6 @@ buildPythonPackage rec { hash = "sha256-wQnE2hNT0UOnPJbHq1eayIO8g0XRZvEH6V19DL6RqoA="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=ld2410_ble --cov-report=term-missing:skip-covered" "" - ''; - build-system = [ poetry-core ]; dependencies = [ @@ -37,7 +33,10 @@ buildPythonPackage rec { bleak-retry-connector ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "ld2410_ble" ]; From 61f4b49af31f587682c05309d172b3ae1895da83 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 13:16:46 +0100 Subject: [PATCH 31/35] python312Packages.moat-ble: refactor --- pkgs/development/python-modules/moat-ble/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/moat-ble/default.nix b/pkgs/development/python-modules/moat-ble/default.nix index 26058cb0577a..7e2c2b0fa2d1 100644 --- a/pkgs/development/python-modules/moat-ble/default.nix +++ b/pkgs/development/python-modules/moat-ble/default.nix @@ -13,20 +13,20 @@ buildPythonPackage rec { pname = "moat-ble"; version = "0.1.1"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "Bluetooth-Devices"; - repo = pname; + repo = "moat-ble"; rev = "refs/tags/v${version}"; hash = "sha256-dy1Fm0Z1PUsPY8QTiXUcWSi+csFnTUsobSkA92m06QI="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ bluetooth-sensor-state-data home-assistant-bluetooth sensor-state-data @@ -45,7 +45,7 @@ buildPythonPackage rec { description = "Library for Moat BLE devices"; homepage = "https://github.com/Bluetooth-Devices/moat-ble"; changelog = "https://github.com/Bluetooth-Devices/moat-ble/releases/tag/v${version}"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From fcd66de40572020e02a287c57acd8d95f58f4fb7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 13:18:07 +0100 Subject: [PATCH 32/35] python312Packages.moat-ble: migrate to pytest-cov-stub --- pkgs/development/python-modules/moat-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/moat-ble/default.nix b/pkgs/development/python-modules/moat-ble/default.nix index 7e2c2b0fa2d1..fe8dbd54ca2a 100644 --- a/pkgs/development/python-modules/moat-ble/default.nix +++ b/pkgs/development/python-modules/moat-ble/default.nix @@ -5,6 +5,7 @@ fetchFromGitHub, home-assistant-bluetooth, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -32,12 +33,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; - - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=moat_ble --cov-report=term-missing:skip-covered" "" - ''; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "moat_ble" ]; From 99cced93d289d1475219dd5a97137d9d7d313e34 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 13:27:13 +0100 Subject: [PATCH 33/35] python312Packages.mopeka-iot-ble: refactor --- .../development/python-modules/mopeka-iot-ble/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/mopeka-iot-ble/default.nix b/pkgs/development/python-modules/mopeka-iot-ble/default.nix index 8798668d6c28..96774a9bd9b8 100644 --- a/pkgs/development/python-modules/mopeka-iot-ble/default.nix +++ b/pkgs/development/python-modules/mopeka-iot-ble/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "bluetooth-devices"; - repo = pname; + repo = "mopeka-iot-ble"; rev = "refs/tags/v${version}"; hash = "sha256-CKLC0p66JapE9qNePE11ttoGMVd4kA7g28kA+pYLXCE="; }; @@ -30,9 +30,9 @@ buildPythonPackage rec { --replace " --cov=mopeka_iot_ble --cov-report=term-missing:skip-covered" "" ''; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ bluetooth-data-tools bluetooth-sensor-state-data home-assistant-bluetooth @@ -47,7 +47,7 @@ buildPythonPackage rec { description = "Library for Mopeka IoT BLE devices"; homepage = "https://github.com/bluetooth-devices/mopeka-iot-ble"; changelog = "https://github.com/Bluetooth-Devices/mopeka-iot-ble/releases/tag/v${version}"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From 343304f3d49db8062d067038d4819bdc54e19d12 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 13:27:36 +0100 Subject: [PATCH 34/35] python312Packages.mopeka-iot-ble: migrate to pytest-cov-stub --- .../python-modules/mopeka-iot-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/mopeka-iot-ble/default.nix b/pkgs/development/python-modules/mopeka-iot-ble/default.nix index 96774a9bd9b8..9f8432f5689b 100644 --- a/pkgs/development/python-modules/mopeka-iot-ble/default.nix +++ b/pkgs/development/python-modules/mopeka-iot-ble/default.nix @@ -6,6 +6,7 @@ fetchFromGitHub, home-assistant-bluetooth, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, sensor-state-data, @@ -25,11 +26,6 @@ buildPythonPackage rec { hash = "sha256-CKLC0p66JapE9qNePE11ttoGMVd4kA7g28kA+pYLXCE="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=mopeka_iot_ble --cov-report=term-missing:skip-covered" "" - ''; - build-system = [ poetry-core ]; dependencies = [ @@ -39,7 +35,10 @@ buildPythonPackage rec { sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "mopeka_iot_ble" ]; From 7d56f84a0730640972c18946e9bb12a406c30374 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Dec 2024 13:33:16 +0100 Subject: [PATCH 35/35] python312Packages.airthings-ble: migrate to pytest-cov-stub --- .../python-modules/airthings-ble/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/airthings-ble/default.nix b/pkgs/development/python-modules/airthings-ble/default.nix index 854ab37120a2..68249000984c 100644 --- a/pkgs/development/python-modules/airthings-ble/default.nix +++ b/pkgs/development/python-modules/airthings-ble/default.nix @@ -7,6 +7,7 @@ buildPythonPackage, fetchFromGitHub, poetry-core, + pytest-cov-stub, pytestCheckHook, pythonOlder, }: @@ -25,11 +26,6 @@ buildPythonPackage rec { hash = "sha256-m2jsXLrj2yS2Wi2dSwyxBv/nXmU738gd5iJ1JVfakUg="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail "-v -Wdefault --cov=airthings_ble --cov-report=term-missing:skip-covered" "" - ''; - build-system = [ poetry-core ]; dependencies = [ @@ -38,7 +34,10 @@ buildPythonPackage rec { bleak-retry-connector ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "airthings_ble" ];