mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
f0f5aa601e
See 8cc1e0aee9
38 lines
970 B
Nix
38 lines
970 B
Nix
{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "tanka";
|
|
version = "0.23.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "grafana";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-exPFlcbku51Bs/YISRyjl8iwLYRVS9ltRQPpd/QpnWk=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-eo4B2p5Yo1r5jro49mSetp9AFYhcTXbyy7wGuaFwbb0=";
|
|
|
|
doCheck = false;
|
|
|
|
subPackages = [ "cmd/tk" ];
|
|
|
|
ldflags = [ "-s" "-w" "-extldflags '-static'" "-X github.com/grafana/tanka/pkg/tanka.CurrentVersion=v${version}" ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
echo "complete -C $out/bin/tk tk" > tk.bash
|
|
installShellCompletion tk.bash
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Flexible, reusable and concise configuration for Kubernetes";
|
|
homepage = "https://tanka.dev";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ mikefaille ];
|
|
mainProgram = "tk";
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|