nixpkgs-suyu/pkgs/applications/networking/cluster/tanka/default.nix

37 lines
947 B
Nix
Raw Normal View History

2020-08-10 00:59:39 +02:00
{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
2020-08-04 15:16:41 +02:00
buildGoModule rec {
pname = "tanka";
2022-02-03 07:57:32 +01:00
version = "0.20.0";
2020-08-04 15:16:41 +02:00
src = fetchFromGitHub {
owner = "grafana";
repo = pname;
rev = "v${version}";
2022-02-03 07:57:32 +01:00
sha256 = "sha256-Wtfn9ffUNKuwByRbeCYq27xvr2DuzxSSQMH9Sv5a7rU=";
2020-08-04 15:16:41 +02:00
};
2022-02-03 07:57:32 +01:00
vendorSha256 = "sha256-ed6rC+wrZHDViGfJrSBl5VUqX/o6RKytXbTKqxb3ZtU=";
2020-08-04 15:16:41 +02:00
doCheck = false;
subPackages = [ "cmd/tk" ];
2021-08-26 08:45:51 +02:00
ldflags = [ "-s" "-w" "-extldflags '-static'" "-X github.com/grafana/tanka/pkg/tanka.CURRENT_VERSION=v${version}" ];
2020-08-04 15:16:41 +02:00
2020-08-10 00:59:39 +02:00
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
echo "complete -C $out/bin/tk tk" > tk.bash
installShellCompletion tk.bash
'';
2020-08-04 15:16:41 +02:00
meta = with lib; {
description = "Flexible, reusable and concise configuration for Kubernetes";
homepage = "https://tanka.dev";
2020-08-04 15:16:41 +02:00
license = licenses.asl20;
maintainers = with maintainers; [ mikefaille ];
platforms = platforms.unix;
};
}