nixpkgs/pkgs/development/tools/ctlptl/default.nix

38 lines
930 B
Nix
Raw Normal View History

2022-10-22 07:44:49 +00:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2022-04-05 21:30:45 +00:00
buildGoModule rec {
pname = "ctlptl";
2023-11-21 02:17:15 +00:00
version = "0.8.24";
2022-04-05 21:30:45 +00:00
src = fetchFromGitHub {
owner = "tilt-dev";
repo = pname;
rev = "v${version}";
2023-11-21 02:17:15 +00:00
hash = "sha256-/ZCXS7B/V5iBTuvt0U9QUaaPFVLHWKnXg0v9fcsSNAE=";
2022-04-05 21:30:45 +00:00
};
2023-11-21 02:17:15 +00:00
vendorHash = "sha256-hWmk/QmkSvRvjt9vcPG07sVwWlqfZrYvY0MGaeKhvTI=";
2022-04-05 21:30:45 +00:00
2022-10-22 07:44:49 +00:00
nativeBuildInputs = [ installShellFiles ];
2022-04-05 21:30:45 +00:00
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
2022-10-22 07:44:49 +00:00
postInstall = ''
installShellCompletion --cmd ctlptl \
--bash <($out/bin/ctlptl completion bash) \
--fish <($out/bin/ctlptl completion fish) \
--zsh <($out/bin/ctlptl completion zsh)
'';
2022-04-05 21:30:45 +00:00
meta = with lib; {
description = "CLI for declaratively setting up local Kubernetes clusters";
homepage = "https://github.com/tilt-dev/ctlptl";
license = licenses.asl20;
maintainers = with maintainers; [ svrana ];
};
}