summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Gosnell <cdep.illabout@gmail.com>2023-05-30 14:43:33 +0900
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2023-06-05 04:13:45 +0000
commitb85d139cbf6f0b1b4d06cb9986fd37f9ed293b1f (patch)
tree004a7bd4d90750a03d5bca59135c27e695463fec
parentMerge pull request #235992 from NixOS/backport-228755-to-release-23.05 (diff)
downloadnixpkgs-b85d139cbf6f0b1b4d06cb9986fd37f9ed293b1f.tar.gz
nomad: add bash completion
(cherry picked from commit 4c8943c83097f2366213a2467e38ee09864b2175)
-rw-r--r--pkgs/applications/networking/cluster/nomad/default.nix8
1 files changed, 8 insertions, 0 deletions
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";