Commit e025e615 authored by sudosubin's avatar sudosubin Committed by Bjørn Forsman
Browse files

bob: add completion

parent 9f66359b
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
{ 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;