From 7ca2b22e0304ac97b4f17a4ad096d71ac268ae3a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 17 Nov 2024 21:13:57 +0100 Subject: [PATCH] python312Packages.python-smarttub: modernize --- .../python-modules/python-smarttub/default.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/python-smarttub/default.nix b/pkgs/development/python-modules/python-smarttub/default.nix index 877cba843a93..a79b3d75b38b 100644 --- a/pkgs/development/python-modules/python-smarttub/default.nix +++ b/pkgs/development/python-modules/python-smarttub/default.nix @@ -10,23 +10,26 @@ pytestCheckHook, python-dateutil, pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "python-smarttub"; version = "0.0.38"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "mdz"; - repo = pname; + repo = "python-smarttub"; rev = "refs/tags/v${version}"; hash = "sha256-ErGBOO5aes4Avmt2M6rkZPmjwsCMZdNnLhMDYhlULzU="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ aiohttp inflection pyjwt @@ -39,14 +42,10 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "pyjwt~=2.1.0" "pyjwt>=2.1.0" - ''; - pythonImportsCheck = [ "smarttub" ]; meta = with lib; { + changelog = "https://github.com/mdz/python-smarttub/releases/tag/v${version}"; description = "Python API for SmartTub enabled hot tubs"; homepage = "https://github.com/mdz/python-smarttub"; license = with licenses; [ mit ];