From 7e43cdd4556d2ba66dea5c15312614e987025d30 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 8 Apr 2026 13:06:21 +0200 Subject: [PATCH] python3Packages.pylutron: migrate to finalAttrs --- .../python-modules/pylutron/default.nix | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/pylutron/default.nix b/pkgs/development/python-modules/pylutron/default.nix index a3807e2e11f8..40eaee6be67c 100644 --- a/pkgs/development/python-modules/pylutron/default.nix +++ b/pkgs/development/python-modules/pylutron/default.nix @@ -7,7 +7,7 @@ telnetlib3, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "pylutron"; version = "0.4.1"; pyproject = true; @@ -15,36 +15,30 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "thecynic"; repo = "pylutron"; - tag = version; + tag = finalAttrs.version; hash = "sha256-bfr0Guu4rbb50arFB6fIWPSqh1hLZY0WO9mALsf8dj0="; }; postPatch = '' substituteInPlace setup.py \ - --replace-fail TEMPLATE_VERSION ${version} + --replace-fail TEMPLATE_VERSION ${finalAttrs.version} ''; build-system = [ setuptools ]; - dependencies = [ - telnetlib3 - ]; + dependencies = [ telnetlib3 ]; pythonImportsCheck = [ "pylutron" ]; - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; - enabledTestPaths = [ - "tests" - ]; + enabledTestPaths = [ "tests" ]; meta = { description = "Python library for controlling a Lutron RadioRA 2 system"; homepage = "https://github.com/thecynic/pylutron"; - changelog = "https://github.com/thecynic/pylutron/releases/tag/${version}"; + changelog = "https://github.com/thecynic/pylutron/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; }; -} +})