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
968 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";
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
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;
};
}