2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2023-07-15 17:15:38 +00:00
|
|
|
, testers
|
|
|
|
, bearer
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "bearer";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "1.19.2";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bearer";
|
|
|
|
repo = "bearer";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-f0vH+GIWTlE23xWMiqbdOJFGWsrEGgz4YJt+4WEdruw=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
vendorHash = "sha256-gqks+q8HxQ54UjRANXBvnfTzE14M8FxbnTMG/JN4ntk=";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"cmd/bearer"
|
|
|
|
];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
2023-07-15 17:15:38 +00:00
|
|
|
"-X=github.com/bearer/bearer/cmd/bearer/build.Version=${version}"
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = bearer;
|
|
|
|
command = "bearer version";
|
|
|
|
};
|
|
|
|
};
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Code security scanning tool (SAST) to discover, filter and prioritize security and privacy risks";
|
|
|
|
homepage = "https://github.com/bearer/bearer";
|
|
|
|
changelog = "https://github.com/Bearer/bearer/releases/tag/v${version}";
|
|
|
|
license = with licenses; [ elastic ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|