From 49e157ab0653b3fed2ecce63a487eeddadbfe9fc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 22 May 2024 13:12:12 +0200 Subject: [PATCH] python311Packages.automate-home: refactor --- .../python-modules/automate-home/default.nix | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/automate-home/default.nix b/pkgs/development/python-modules/automate-home/default.nix index c13395aa42e3..9386e4585abf 100644 --- a/pkgs/development/python-modules/automate-home/default.nix +++ b/pkgs/development/python-modules/automate-home/default.nix @@ -7,6 +7,7 @@ , hiredis , aioredis , ephem +, setuptools , pytz , pyyaml }: @@ -14,7 +15,7 @@ buildPythonPackage rec { pname = "automate-home"; version = "0.9.1"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.8"; @@ -23,7 +24,18 @@ buildPythonPackage rec { hash = "sha256-41qd+KPSrOrczkovwXht3irbcYlYehBZ1HZ44yZe4cM="; }; - propagatedBuildInputs = [ + postPatch = '' + # Rename pyephem, https://github.com/majamassarini/automate-home/pull/3 + substituteInPlace setup.py \ + --replace-fail "pyephem" "ephem" \ + --replace-fail "aioredis==1.3.1" "aioredis" + ''; + + build-system = [ + setuptools + ]; + + dependencies = [ apscheduler hiredis aioredis @@ -36,13 +48,6 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - # Rename pyephem, https://github.com/majamassarini/automate-home/pull/3 - substituteInPlace setup.py \ - --replace "pyephem" "ephem" \ - --replace "aioredis==1.3.1" "aioredis" - ''; - pythonImportsCheck = [ "home" ]; @@ -50,6 +55,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python module to automate (home) devices"; homepage = "https://github.com/majamassarini/automate-home"; + changelog = "https://github.com/majamassarini/automate-home/releases/tag/${version}"; license = licenses.gpl3Only; maintainers = with maintainers; [ fab ]; };