From 4442964c0c68587710256dd77a1c81197510bf57 Mon Sep 17 00:00:00 2001 From: Ethan Carter Edwards Date: Thu, 21 May 2026 02:19:58 -0400 Subject: [PATCH] comma: modernize Tag, structuredAttrs, versionCheckHook Signed-off-by: Ethan Carter Edwards --- pkgs/by-name/co/comma/package.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/co/comma/package.nix b/pkgs/by-name/co/comma/package.nix index 819e9f9df38d..af71638565e1 100644 --- a/pkgs/by-name/co/comma/package.nix +++ b/pkgs/by-name/co/comma/package.nix @@ -1,6 +1,5 @@ { stdenv, - comma, fetchFromGitHub, installShellFiles, fzy, @@ -8,7 +7,7 @@ nix-index-unwrapped, nix, rustPlatform, - testers, + versionCheckHook, buildPackages, }: @@ -16,10 +15,12 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "comma"; version = "2.4.1"; + __structuredAttrs = true; + src = fetchFromGitHub { owner = "nix-community"; repo = "comma"; - rev = "v${finalAttrs.version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-XZB0zx4wyNzy0LggAmh2gT2aEWAqVI9NljRoOkeK0c8="; }; @@ -56,9 +57,8 @@ rustPlatform.buildRustPackage (finalAttrs: { installManPage comma.1 ''; - passthru.tests = { - version = testers.testVersion { package = comma; }; - }; + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; meta = { homepage = "https://github.com/nix-community/comma";