mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
43 lines
990 B
Nix
43 lines
990 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "k0sctl";
|
|
version = "0.13.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "k0sproject";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-uKN+vH7BGz8lUDrmPeLp941KPkkTfOkK4Ib9GZR9D0M=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-CZ8DmgYXQcpd43qm6YsVHFePuUochHgJG7/ffEK8LL8=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/k0sproject/k0sctl/version.Environment=production"
|
|
"-X github.com/k0sproject/k0sctl/version.Version=${version}"
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
for shell in bash zsh fish; do
|
|
installShellCompletion --cmd ${pname} \
|
|
--$shell <($out/bin/${pname} completion --shell $shell)
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A bootstrapping and management tool for k0s clusters.";
|
|
homepage = "https://k0sproject.io/";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ nickcao ];
|
|
};
|
|
}
|