From b93a93de03a601d4b95cbf06963155e6ef065981 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 12 Apr 2024 12:45:43 +0200 Subject: [PATCH] python312Packages.aioasuswrt: refactor --- .../python-modules/aioasuswrt/default.nix | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/aioasuswrt/default.nix b/pkgs/development/python-modules/aioasuswrt/default.nix index b496c9ac2593..719e66121fc0 100644 --- a/pkgs/development/python-modules/aioasuswrt/default.nix +++ b/pkgs/development/python-modules/aioasuswrt/default.nix @@ -5,21 +5,35 @@ , pytest-asyncio , pytest-mock , pytestCheckHook +, pythonOlder +, setuptools }: buildPythonPackage rec { pname = "aioasuswrt"; version = "1.4.0"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "kennedyshead"; - repo = pname; - rev = "V${version}"; - sha256 = "1iv9f22v834g8wrjcynjn2azpzk8gsczv71jf7dw8aix0n04h325"; + repo = "aioasuswrt"; + rev = "refs/tags/V${version}"; + hash = "sha256-RQxIgAU9KsTbcTKc/Zl+aP77lbDSeiYzR48MtIVwacc="; }; - propagatedBuildInputs = [ + postPatch = '' + substituteInPlace setup.cfg \ + --replace-fail "--cov-report html" "" \ + --replace-fail "--cov-report term-missing" "" + ''; + + build-system = [ + setuptools + ]; + + dependencies = [ asyncssh ]; @@ -29,12 +43,6 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "--cov-report html" "" \ - --replace "--cov-report term-missing" "" - ''; - pythonImportsCheck = [ "aioasuswrt" ]; @@ -42,6 +50,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python module for Asuswrt"; homepage = "https://github.com/kennedyshead/aioasuswrt"; + changelog = "https://github.com/kennedyshead/aioasuswrt/releases/tag/V${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; };