depot/third_party/nixpkgs/pkgs/by-name/ko/kor/package.nix

38 lines
766 B
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "kor";
version = "0.5.7";
src = fetchFromGitHub {
owner = "yonahd";
repo = pname;
rev = "v${version}";
hash = "sha256-r494fmkT94rLEAfeXpiYKt8sCmTHT5fktQXaIbUgMoM=";
};
vendorHash = "sha256-OldJ80DYSlihhnjaCGh3Qh0g80pC4EstP+r3UO309Y0=";
preCheck = ''
HOME=$(mktemp -d)
export HOME
'';
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Golang Tool to discover unused Kubernetes Resources";
homepage = "https://github.com/yonahd/kor";
changelog = "https://github.com/yonahd/kor/releases/tag/v${version}";
license = licenses.mit;
maintainers = [ maintainers.ivankovnatsky ];
mainProgram = "kor";
};
}