mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-21 20:34:06 +00:00
bob: add completion
This commit is contained in:
parent
9f66359b60
commit
e025e615f2
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user