From eddda0f350bb2e2688596f97a209fc1e2b1ef2d9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Nov 2024 21:15:48 +0100 Subject: [PATCH] python312Packages.aioflo: refactor --- .../python-modules/aioflo/default.nix | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/aioflo/default.nix b/pkgs/development/python-modules/aioflo/default.nix index 13b51bf8ad21d..a67453821a8d0 100644 --- a/pkgs/development/python-modules/aioflo/default.nix +++ b/pkgs/development/python-modules/aioflo/default.nix @@ -15,34 +15,29 @@ buildPythonPackage rec { pname = "aioflo"; version = "2021.11.0"; - format = "pyproject"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "bachya"; - repo = pname; - rev = version; + repo = "aioflo"; + rev = "refs/tags/${version}"; hash = "sha256-7NrOoc1gi8YzZaKvCnHnzAKPlMnMhqxjdyZGN5H/8TQ="; }; patches = [ - # This patch removes references to setuptools and wheel that are no longer - # necessary and changes poetry to poetry-core, so that we don't need to add - # unnecessary nativeBuildInputs. - # - # https://github.com/bachya/aioflo/pull/65 - # (fetchpatch { + # Clean-up, https://github.com/bachya/aioflo/pull/65 name = "clean-up-build-dependencies.patch"; url = "https://github.com/bachya/aioflo/commit/f38d3f6427777ab0eeb56177943679e2570f0634.patch"; hash = "sha256-iLgklhEZ61rrdzQoO6rp1HGZcqLsqGNitwIiPNLNHQ4="; }) ]; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ aiohttp ]; + dependencies = [ aiohttp ]; __darwinAllowLocalNetworking = true; @@ -55,10 +50,16 @@ buildPythonPackage rec { pythonImportsCheck = [ "aioflo" ]; + disabledTests = [ + # test is out-dated + "test_system_modes" + ]; + meta = with lib; { description = "Python library for Flo by Moen Smart Water Detectors"; homepage = "https://github.com/bachya/aioflo"; - license = with licenses; [ mit ]; + changelog = "https://github.com/bachya/aioflo/releases/tag/${version}"; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; }