nixpkgs/pkgs/applications/networking/cluster/kube-score/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
979 B
Nix
Raw Normal View History

2022-12-13 16:02:04 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
2023-07-09 14:26:42 +00:00
, testers
, kube-score
2022-12-13 16:02:04 +00:00
}:
2021-03-25 23:19:20 +00:00
buildGoModule rec {
pname = "kube-score";
2024-02-06 04:53:35 +00:00
version = "1.18.0";
2021-03-25 23:19:20 +00:00
src = fetchFromGitHub {
owner = "zegl";
repo = pname;
rev = "v${version}";
2024-02-06 04:53:35 +00:00
hash = "sha256-3OdcYqSUy0WH5CrrRMXDs1HGxvToXx/3iPytYBdDncg=";
2021-03-25 23:19:20 +00:00
};
2024-02-06 04:53:35 +00:00
vendorHash = "sha256-4yd/N57O3avD8KaGU9lZAEDasPx1pRx37rqQpuGeRiY=";
2021-03-25 23:19:20 +00:00
2023-07-09 14:24:16 +00:00
ldflags = [
"-s"
"-w"
"-X=main.version=${version}"
"-X=main.commit=${src.rev}"
];
2023-07-09 14:26:42 +00:00
passthru.tests = {
version = testers.testVersion {
package = kube-score;
command = "kube-score version";
};
};
2021-03-25 23:19:20 +00:00
meta = with lib; {
description = "Kubernetes object analysis with recommendations for improved reliability and security";
mainProgram = "kube-score";
2022-12-13 16:02:04 +00:00
homepage = "https://github.com/zegl/kube-score";
changelog = "https://github.com/zegl/kube-score/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ j4m3s ];
2021-03-25 23:19:20 +00:00
};
}