From 5a04e268f99ed52b2ab1ab3a0cc11d6528cb9302 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 12 Aug 2024 03:59:20 +0200 Subject: [PATCH] python311Packages.atc-ble: modernize --- .../python-modules/atc-ble/default.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/atc-ble/default.nix b/pkgs/development/python-modules/atc-ble/default.nix index 76e572401904..1b099a8d0f41 100644 --- a/pkgs/development/python-modules/atc-ble/default.nix +++ b/pkgs/development/python-modules/atc-ble/default.nix @@ -6,6 +6,7 @@ poetry-core, pycryptodomex, pytestCheckHook, + pytest-cov-stub, pythonOlder, sensor-state-data, }: @@ -13,31 +14,29 @@ buildPythonPackage rec { pname = "atc-ble"; version = "0.1.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "Bluetooth-Devices"; - repo = pname; + repo = "atc-ble"; rev = "refs/tags/v${version}"; hash = "sha256-rwOFKxUlbbNIDJRdCmZpHstXwxcTnvlExgcVDdGbIVY="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace " --cov=atc_ble --cov-report=term-missing:skip-covered" "" - ''; + build-system = [ poetry-core ]; - nativeBuildInputs = [ poetry-core ]; - - propagatedBuildInputs = [ + dependencies = [ bluetooth-sensor-state-data pycryptodomex sensor-state-data ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + pytest-cov-stub + ]; pythonImportsCheck = [ "atc_ble" ];