diff options
author | sudosubin <sudosubin@gmail.com> | 2023-09-22 09:47:42 +0900 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2023-09-22 07:33:02 +0200 |
commit | e025e615f2c187cab7ca8abec9daca7ea3f05659 (patch) | |
tree | 57abdfffbfdca3f2182f238cc369d50917298ed5 /pkgs | |
parent | 9f66359b60cca2f9688fa97902eb9c17f28ce5de (diff) |
bob: add completion
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/tools/build-managers/bob/default.nix | 10 |
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 2a8a1eda465a6..97e67ce977985 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; |