summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/tanka/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/cluster/tanka/default.nix')
-rw-r--r--pkgs/applications/networking/cluster/tanka/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/applications/networking/cluster/tanka/default.nix b/pkgs/applications/networking/cluster/tanka/default.nix
index 2a7899f2fed..1793af1085a 100644
--- a/pkgs/applications/networking/cluster/tanka/default.nix
+++ b/pkgs/applications/networking/cluster/tanka/default.nix
@@ -1,4 +1,4 @@
-{ buildGoModule, fetchFromGitHub, lib }:
+{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
 
 buildGoModule rec {
   pname = "tanka";
@@ -17,6 +17,13 @@ buildGoModule rec {
 
   buildFlagsArray = [ "-ldflags=-s -w -X main.Version=${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://github.com/grafana/tanka/";