From 2f3bdc7f64d5093d2c2698882efa7950a9e1d72b Mon Sep 17 00:00:00 2001 From: Harinn Date: Sat, 6 Jun 2026 09:35:35 +0700 Subject: [PATCH] python3Packages.cart: modernize --- pkgs/development/python-modules/cart/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/cart/default.nix b/pkgs/development/python-modules/cart/default.nix index 587610928ff5..e1735ef501a3 100644 --- a/pkgs/development/python-modules/cart/default.nix +++ b/pkgs/development/python-modules/cart/default.nix @@ -7,15 +7,17 @@ setuptools, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "cart"; version = "1.2.3"; pyproject = true; + __structuredAttrs = true; + src = fetchFromGitHub { owner = "CybercentreCanada"; repo = "cart"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-oeWeay1Pr9T4oR3XSrwv9hRr/sLTel1Bt6BG6jHXxIA="; }; @@ -33,8 +35,8 @@ buildPythonPackage rec { description = "Python module for the CaRT Neutering format"; mainProgram = "cart"; homepage = "https://github.com/CybercentreCanada/cart"; - changelog = "https://github.com/CybercentreCanada/cart/releases/tag/${src.tag}"; + changelog = "https://github.com/CybercentreCanada/cart/releases/tag/${finalAttrs.src.tag}"; license = with lib.licenses; [ mit ]; maintainers = with lib.maintainers; [ fab ]; }; -} +})