2020-08-09 22:59:39 +00:00
|
|
|
{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
|
2020-08-04 13:16:41 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "tanka";
|
2022-09-30 00:28:34 +00:00
|
|
|
version = "0.23.1";
|
2020-08-04 13:16:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "grafana";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-09-30 00:28:34 +00:00
|
|
|
sha256 = "sha256-exPFlcbku51Bs/YISRyjl8iwLYRVS9ltRQPpd/QpnWk=";
|
2020-08-04 13:16:41 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 00:28:34 +00:00
|
|
|
vendorSha256 = "sha256-eo4B2p5Yo1r5jro49mSetp9AFYhcTXbyy7wGuaFwbb0=";
|
2020-08-04 13:16:41 +00:00
|
|
|
|
2020-08-04 00:26:27 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-03-24 01:34:17 +00:00
|
|
|
subPackages = [ "cmd/tk" ];
|
|
|
|
|
2022-10-10 12:13:42 +00:00
|
|
|
ldflags = [ "-s" "-w" "-extldflags '-static'" "-X github.com/grafana/tanka/pkg/tanka.CurrentVersion=v${version}" ];
|
2020-08-04 13:16:41 +00:00
|
|
|
|
2020-08-09 22:59:39 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
echo "complete -C $out/bin/tk tk" > tk.bash
|
|
|
|
installShellCompletion tk.bash
|
|
|
|
'';
|
|
|
|
|
2020-08-04 13:16:41 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Flexible, reusable and concise configuration for Kubernetes";
|
2021-03-24 01:34:17 +00:00
|
|
|
homepage = "https://tanka.dev";
|
2020-08-04 13:16:41 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ mikefaille ];
|
2022-04-01 19:34:55 +00:00
|
|
|
mainProgram = "tk";
|
2020-08-04 13:16:41 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|