From f682376dcfeec00b8b1517d5e71a74b628ba34c4 Mon Sep 17 00:00:00 2001 From: Harinn Date: Fri, 24 Jul 2026 11:37:25 +0700 Subject: [PATCH] python3Packages.uasiren: modernize --- .../development/python-modules/uasiren/default.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/uasiren/default.nix b/pkgs/development/python-modules/uasiren/default.nix index 89eba4c96cb3..94aef05ac844 100644 --- a/pkgs/development/python-modules/uasiren/default.nix +++ b/pkgs/development/python-modules/uasiren/default.nix @@ -15,19 +15,17 @@ pytestCheckHook, }: -let +buildPythonPackage (finalAttrs: { pname = "uasiren"; version = "0.0.1"; -in - -buildPythonPackage { - inherit pname version; pyproject = true; + __structuredAttrs = true; + src = fetchFromGitHub { owner = "PaulAnnekov"; repo = "uasiren"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-NHrnG5Vhz+JZgcTJyfIgGz0Ye+3dFVv2zLCCqw2++oM="; }; @@ -49,10 +47,10 @@ buildPythonPackage { ]; meta = { - changelog = "https://github.com/PaulAnnekov/uasiren/releases/tag/v${version}"; + changelog = "https://github.com/PaulAnnekov/uasiren/releases/tag/${finalAttrs.src.tag}"; description = "Implements siren.pp.ua API - public wrapper for api.ukrainealarm.com API that returns info about Ukraine air-raid alarms"; homepage = "https://github.com/PaulAnnekov/uasiren"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ hexa ]; }; -} +})