terraform-docs: add passthru.tests.version

+9 -3
+9 -3
pkgs/by-name/te/terraform-docs/package.nix
··· 7 buildGo124Module, 8 fetchFromGitHub, 9 installShellFiles, 10 }: 11 12 - buildGo124Module rec { 13 pname = "terraform-docs"; 14 version = "0.20.0"; 15 16 src = fetchFromGitHub { 17 owner = "terraform-docs"; 18 repo = "terraform-docs"; 19 - tag = "v${version}"; 20 hash = "sha256-DiKoYAe7vcNy35ormKHYZcZrGK/MEb6VmcHWPgrbmUg="; 21 }; 22 ··· 40 installShellCompletion terraform-docs.{bash,fish,zsh} 41 ''; 42 43 meta = with lib; { 44 description = "Utility to generate documentation from Terraform modules in various output formats"; 45 mainProgram = "terraform-docs"; ··· 47 license = licenses.mit; 48 maintainers = with maintainers; [ zimbatm ]; 49 }; 50 - }
··· 7 buildGo124Module, 8 fetchFromGitHub, 9 installShellFiles, 10 + testers, 11 }: 12 13 + buildGo124Module (finalAttrs: { 14 pname = "terraform-docs"; 15 version = "0.20.0"; 16 17 src = fetchFromGitHub { 18 owner = "terraform-docs"; 19 repo = "terraform-docs"; 20 + tag = "v${finalAttrs.version}"; 21 hash = "sha256-DiKoYAe7vcNy35ormKHYZcZrGK/MEb6VmcHWPgrbmUg="; 22 }; 23 ··· 41 installShellCompletion terraform-docs.{bash,fish,zsh} 42 ''; 43 44 + passthru.tests.version = testers.testVersion { 45 + package = finalAttrs.finalPackage; 46 + version = "v${finalAttrs.version}"; 47 + }; 48 + 49 meta = with lib; { 50 description = "Utility to generate documentation from Terraform modules in various output formats"; 51 mainProgram = "terraform-docs"; ··· 53 license = licenses.mit; 54 maintainers = with maintainers; [ zimbatm ]; 55 }; 56 + })