From 4e899b3a9407a0767fb349a8adb139ec9806d831 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Wed, 15 Feb 2023 14:39:18 +0100 Subject: [PATCH] scorecard: add 'version' test --- pkgs/tools/security/scorecard/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/scorecard/default.nix b/pkgs/tools/security/scorecard/default.nix index befc07e2e18d..ece55a23f795 100644 --- a/pkgs/tools/security/scorecard/default.nix +++ b/pkgs/tools/security/scorecard/default.nix @@ -1,4 +1,11 @@ -{ lib, buildGoModule, fetchFromGitHub, fetchgit, installShellFiles }: +{ lib +, buildGoModule +, fetchFromGitHub +, fetchgit +, installShellFiles +, testers +, scorecard +}: buildGoModule rec { pname = "scorecard"; @@ -67,6 +74,12 @@ buildGoModule rec { runHook postInstallCheck ''; + passthru.tests.version = testers.testVersion { + package = scorecard; + command = "scorecard version"; + version = "v${version}"; + }; + meta = with lib; { homepage = "https://github.com/ossf/scorecard"; changelog = "https://github.com/ossf/scorecard/releases/tag/v${version}";