about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/argocd-vault-plugin/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/security/argocd-vault-plugin/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/security/argocd-vault-plugin/default.nix21
1 files changed, 20 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/tools/security/argocd-vault-plugin/default.nix b/nixpkgs/pkgs/tools/security/argocd-vault-plugin/default.nix
index bd6e4c15fa27..934be7d09942 100644
--- a/nixpkgs/pkgs/tools/security/argocd-vault-plugin/default.nix
+++ b/nixpkgs/pkgs/tools/security/argocd-vault-plugin/default.nix
@@ -1,4 +1,9 @@
-{ buildGoModule, fetchFromGitHub, lib }:
+{ buildGoModule
+, fetchFromGitHub
+, lib
+, testers
+, argocd-vault-plugin
+}:
 
 buildGoModule rec {
   pname = "argocd-vault-plugin";
@@ -13,9 +18,23 @@ buildGoModule rec {
 
   vendorHash = "sha256-0PrGrcS8Gx0cVImGrlmXlycFgWCTLjg2ISi0OhYoPpw=";
 
+  ldflags = [
+    "-X=github.com/argoproj-labs/argocd-vault-plugin/version.Version=v${version}"
+    "-X=github.com/argoproj-labs/argocd-vault-plugin/version.BuildDate=1970-01-01T00:00:00Z"
+    "-X=github.com/argoproj-labs/argocd-vault-plugin/version.CommitSHA=unknown"
+  ];
+
   # integration tests require filesystem and network access for credentials
   doCheck = false;
 
+  doInstallCheck = true;
+
+  passthru.tests.version = testers.testVersion {
+    package = argocd-vault-plugin;
+    command = "argocd-vault-plugin version";
+    version = "argocd-vault-plugin v${version} (unknown) BuildDate: 1970-01-01T00:00:00Z";
+  };
+
   meta = with lib; {
     homepage = "https://argocd-vault-plugin.readthedocs.io";
     changelog = "https://github.com/argoproj-labs/argocd-vault-plugin/releases/tag/v${version}";