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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
970 B
Nix
Raw Normal View History

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
doCheck = false;
subPackages = [ "cmd/tk" ];
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";
homepage = "https://tanka.dev";
2020-08-04 13:16:41 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ mikefaille ];
mainProgram = "tk";
2020-08-04 13:16:41 +00:00
platforms = platforms.unix;
};
}