2020-08-09 22:59:39 +00:00
|
|
|
{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
|
2020-08-04 13:16:41 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "tanka";
|
2023-02-01 13:53:25 +00:00
|
|
|
version = "0.24.0";
|
2020-08-04 13:16:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "grafana";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-02-01 13:53:25 +00:00
|
|
|
sha256 = "sha256-RZLmbf9ginMbFAaUKL5mK5HIYQslP8Vu8zdh1OJ1P1Y=";
|
2020-08-04 13:16:41 +00:00
|
|
|
};
|
|
|
|
|
2023-02-01 13:53:25 +00:00
|
|
|
vendorHash = "sha256-g9e0NesI7WdaTHZ57XRlo8as3IWAFlFW4nkyf6+kd40=";
|
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;
|
|
|
|
};
|
|
|
|
}
|