Unverified Commit 8d04d99e authored by Donovan Glover's avatar Donovan Glover Committed by GitHub
Browse files

Merge pull request #331629 from DCsunset/step-cli-completion

step-cli: install shell completion
parents 47c8f5e2 b506b66a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -156,3 +156,6 @@ bdfde18037f8d9f9b641a4016c8ada4dc4cbf856

# nixos/nvidia: apply nixfmt-rfc-style (#313440)
fbdcdde04a7caa007e825a8b822c75fab9adb2d6

# step-cli: format package.nix with nixfmt (#331629)
fc7a83f8b62e90de5679e993d4d49ca014ea013d
+42 −30
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildGoModule,
  fetchFromGitHub,
}: let
  installShellFiles,
}:
let
  version = "0.27.2";
in
buildGoModule {
@@ -29,6 +32,15 @@ in

  vendorHash = "sha256-GD9TAvWqE3nvgVpoy/4CkkdVxliNMy+GNBXJtGSNVqo=";

  nativeBuildInputs = [ installShellFiles ];

  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
    installShellCompletion --cmd step \
      --bash <($out/bin/step completion bash) \
      --zsh <($out/bin/step completion zsh) \
      --fish <($out/bin/step completion fish)
  '';

  meta = {
    description = "Zero trust swiss army knife for working with X509, OAuth, JWT, OATH OTP, etc";
    homepage = "https://smallstep.com/cli/";