terraform-docs: add passthru.tests.version

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