summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers/bob/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/build-managers/bob/default.nix')
-rw-r--r--pkgs/development/tools/build-managers/bob/default.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/development/tools/build-managers/bob/default.nix b/pkgs/development/tools/build-managers/bob/default.nix
index 2a8a1eda465..97e67ce9779 100644
--- a/pkgs/development/tools/build-managers/bob/default.nix
+++ b/pkgs/development/tools/build-managers/bob/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildGoModule, fetchFromGitHub }:
+{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
 
 buildGoModule rec {
   pname = "bob";
@@ -17,6 +17,14 @@ buildGoModule rec {
 
   excludedPackages = [ "example/server-db" "test/e2e" "tui-example" ];
 
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
+    installShellCompletion --cmd bob \
+      --bash <($out/bin/bob completion) \
+      --zsh <($out/bin/bob completion -z)
+  '';
+
   # tests require network access
   doCheck = false;