2020-08-09 23:59:39 +01:00
|
|
|
{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
|
2020-08-04 14:16:41 +01:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "tanka";
|
2021-09-16 00:45:50 +01:00
|
|
|
version = "0.17.3";
|
2020-08-04 14:16:41 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "grafana";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-09-16 00:45:50 +01:00
|
|
|
sha256 = "sha256-Khu6ovtcXkqqt3W4OoJ09INgv80tw/6uDcJS+jt3y0Y=";
|
2020-08-04 14:16:41 +01:00
|
|
|
};
|
|
|
|
|
2021-02-06 20:57:06 +00:00
|
|
|
vendorSha256 = "sha256-vpm2y/CxRNWkz6+AOMmmZH5AjRQWAa6WD5Fnx5lqJYw=";
|
2020-08-04 14:16:41 +01:00
|
|
|
|
2020-08-04 01:26:27 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-03-24 01:34:17 +00:00
|
|
|
subPackages = [ "cmd/tk" ];
|
|
|
|
|
2021-08-26 07:45:51 +01:00
|
|
|
ldflags = [ "-s" "-w" "-extldflags '-static'" "-X github.com/grafana/tanka/pkg/tanka.CURRENT_VERSION=v${version}" ];
|
2020-08-04 14:16:41 +01:00
|
|
|
|
2020-08-09 23:59:39 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
echo "complete -C $out/bin/tk tk" > tk.bash
|
|
|
|
installShellCompletion tk.bash
|
|
|
|
'';
|
|
|
|
|
2020-08-04 14:16:41 +01: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 14:16:41 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ mikefaille ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|