nixpkgs/pkgs/by-name/ku/kube-score/package.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 15:26:42 +01: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-11-01 07:19:56 +00:00
version = "1.19.0";
2021-03-25 23:19:20 +00:00
src = fetchFromGitHub {
owner = "zegl";
repo = pname;
rev = "v${version}";
2024-11-01 07:19:56 +00:00
hash = "sha256-YsbefR6WkFef5nhbD9ACQ7Xx572RsHlL2zY78RtTtsQ=";
2021-03-25 23:19:20 +00:00
};
2024-11-01 07:19:56 +00:00
vendorHash = "sha256-9P7emxfRolhGEMiAJmBczksWkyHVFUtPZaNrjXkZ4t4=";
2021-03-25 23:19:20 +00:00
2023-07-09 15:24:16 +01:00
ldflags = [
"-s"
"-w"
"-X=main.version=${version}"
"-X=main.commit=${src.rev}"
];
2023-07-09 15:26:42 +01: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
};
}