From 6ed04dd9168b01b1d802bb14ccf5a3eb915f283f Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 29 May 2023 14:05:21 -0400 Subject: [PATCH 1/2] bearer: fix version --- pkgs/development/tools/bearer/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/tools/bearer/default.nix b/pkgs/development/tools/bearer/default.nix index 8f78f21e4da3..347ac1329161 100644 --- a/pkgs/development/tools/bearer/default.nix +++ b/pkgs/development/tools/bearer/default.nix @@ -23,10 +23,9 @@ buildGoModule rec { ldflags = [ "-s" "-w" + "-X=github.com/bearer/bearer/cmd/bearer/build.Version=${version}" ]; -# doCheck = false; - meta = with lib; { description = "Code security scanning tool (SAST) to discover, filter and prioritize security and privacy risks"; homepage = "https://github.com/bearer/bearer"; From 713371eed7f1b62ba2c4557e19f231725f31ee2a Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 29 May 2023 14:07:30 -0400 Subject: [PATCH 2/2] bearer: add version test --- pkgs/development/tools/bearer/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/tools/bearer/default.nix b/pkgs/development/tools/bearer/default.nix index 347ac1329161..f5214d3aa060 100644 --- a/pkgs/development/tools/bearer/default.nix +++ b/pkgs/development/tools/bearer/default.nix @@ -1,6 +1,8 @@ { lib , buildGoModule , fetchFromGitHub +, testers +, bearer }: buildGoModule rec { @@ -26,6 +28,13 @@ buildGoModule rec { "-X=github.com/bearer/bearer/cmd/bearer/build.Version=${version}" ]; + passthru.tests = { + version = testers.testVersion { + package = bearer; + command = "bearer version"; + }; + }; + meta = with lib; { description = "Code security scanning tool (SAST) to discover, filter and prioritize security and privacy risks"; homepage = "https://github.com/bearer/bearer";