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-06-17 23:14:19 +00:00
|
|
|
version = "0.22.1";
|
2020-08-04 13:16:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "grafana";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-06-17 23:14:19 +00:00
|
|
|
sha256 = "sha256-MMQv3/Ft6/FUueGEXGqYWAYy4zc2R6LASbh2x7eJNdQ=";
|
2020-08-04 13:16:41 +00:00
|
|
|
};
|
|
|
|
|
2022-06-17 23:14:19 +00:00
|
|
|
vendorSha256 = "sha256-QwtcWzJbusa8BxtG5xmGUgqG0qCMSpkzbmes/x3lnWc=";
|
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" ];
|
|
|
|
|
2021-08-26 06:45:51 +00:00
|
|
|
ldflags = [ "-s" "-w" "-extldflags '-static'" "-X github.com/grafana/tanka/pkg/tanka.CURRENT_VERSION=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;
|
|
|
|
};
|
|
|
|
}
|