From 4c8943c83097f2366213a2467e38ee09864b2175 Mon Sep 17 00:00:00 2001 From: Dennis Gosnell Date: Tue, 30 May 2023 14:43:33 +0900 Subject: [PATCH] nomad: add bash completion --- pkgs/applications/networking/cluster/nomad/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/applications/networking/cluster/nomad/default.nix b/pkgs/applications/networking/cluster/nomad/default.nix index ce0ee37849cc..998f7f6069a0 100644 --- a/pkgs/applications/networking/cluster/nomad/default.nix +++ b/pkgs/applications/networking/cluster/nomad/default.nix @@ -3,6 +3,7 @@ , buildGo120Module , fetchFromGitHub , nixosTests +, installShellFiles }: let @@ -23,11 +24,18 @@ let inherit sha256; }; + nativeBuildInputs = [ installShellFiles ]; + # ui: # Nomad release commits include the compiled version of the UI, but the file # is only included if we build with the ui tag. tags = [ "ui" ]; + postInstall = '' + echo "complete -C $out/bin/nomad nomad" > nomad.bash + installShellCompletion nomad.bash + ''; + meta = with lib; { homepage = "https://www.nomadproject.io/"; description = "A Distributed, Highly Available, Datacenter-Aware Scheduler";