summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/tanka
diff options
context:
space:
mode:
authorDaniƫl de Kok <me@danieldk.eu>2020-08-21 19:22:33 +0200
committerGitHub <noreply@github.com>2020-08-21 19:22:33 +0200
commit117c05954b133af3f741bf6844332cb5eebc31f5 (patch)
tree8da45db20f1590c4e410c412dc9a3317a4244555 /pkgs/applications/networking/cluster/tanka
parent57dbe336375bd09e4037a85d4bf28d5f03d1d894 (diff)
parent738d3dda54b39f62be82886a17f6fbcb311c9ab4 (diff)
downloadnixpkgs-117c05954b133af3f741bf6844332cb5eebc31f5.tar
nixpkgs-117c05954b133af3f741bf6844332cb5eebc31f5.tar.gz
nixpkgs-117c05954b133af3f741bf6844332cb5eebc31f5.tar.bz2
nixpkgs-117c05954b133af3f741bf6844332cb5eebc31f5.tar.lz
nixpkgs-117c05954b133af3f741bf6844332cb5eebc31f5.tar.xz
nixpkgs-117c05954b133af3f741bf6844332cb5eebc31f5.tar.zst
nixpkgs-117c05954b133af3f741bf6844332cb5eebc31f5.zip
Merge pull request #95106 from mikefaille/tanka
tanka: add bash completion
Diffstat (limited to 'pkgs/applications/networking/cluster/tanka')
-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/";