summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/networking/cluster/argo
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2020-06-25 22:01:51 -0500
committerMario Rodas <marsam@users.noreply.github.com>2020-06-25 22:01:51 -0500
commita7f888e5f3e24d35944c89d3b5212eac1d241ea4 (patch)
treee2275f179b2c8838d70ef94568dab488d659eaf1 /pkgs/applications/networking/cluster/argo
parent4d6876aeef6899ece02f4adc2a9ffbdcdab003d8 (diff)
argo: install completions
Diffstat (limited to 'pkgs/applications/networking/cluster/argo')
-rw-r--r--pkgs/applications/networking/cluster/argo/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/applications/networking/cluster/argo/default.nix b/pkgs/applications/networking/cluster/argo/default.nix
index c8d239f39270..4f05c90cff81 100644
--- a/pkgs/applications/networking/cluster/argo/default.nix
+++ b/pkgs/applications/networking/cluster/argo/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildGoModule, buildGoPackage, fetchFromGitHub }:
+{ lib, buildGoModule, buildGoPackage, fetchFromGitHub, installShellFiles }:
let
# Argo can package a static server in the CLI using the `staticfiles` go module.
@@ -32,6 +32,8 @@ buildGoModule rec {
subPackages = [ "cmd/argo" ];
+ nativeBuildInputs = [ installShellFiles ];
+
preBuild = ''
mkdir -p ui/dist/app
echo "Built without static files" > ui/dist/app/index.html
@@ -48,6 +50,13 @@ buildGoModule rec {
-X github.com/argoproj/argo.gitTag=${version}
'';
+ postInstall = ''
+ for shell in bash zsh; do
+ $out/bin/argo completion $shell > argo.$shell
+ installShellCompletion argo.$shell
+ done
+ '';
+
meta = with lib; {
description = "Container native workflow engine for Kubernetes";
homepage = "https://github.com/argoproj/argo";