diff --git a/pkgs/tools/admin/berglas/default.nix b/pkgs/tools/admin/berglas/default.nix index 113a98b5650f..f9af2e94c015 100644 --- a/pkgs/tools/admin/berglas/default.nix +++ b/pkgs/tools/admin/berglas/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, testers, berglas }: let skipTests = { @@ -38,8 +38,20 @@ buildGoModule rec { vendorHash = "sha256-qcFS07gma7GVxhdrYca0E6rcczNcZmU8JcjjcpEaxp0="; + ldflags = [ + "-s" + "-w" + "-X=github.com/GoogleCloudPlatform/berglas/internal/version.Version=${version}" + ]; + postPatch = skipTestsCommand; + passthru.tests = { + version = testers.testVersion { + package = berglas; + }; + }; + meta = with lib; { description = "A tool for managing secrets on Google Cloud"; homepage = "https://github.com/GoogleCloudPlatform/berglas";