Skip to content

Commit

Permalink
step-cli: install shell completion
Browse files Browse the repository at this point in the history
  • Loading branch information
DCsunset committed Aug 2, 2024
1 parent fc7a83f commit 8134395
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkgs/by-name/st/step-cli/package.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
let
version = "0.27.2";
Expand Down Expand Up @@ -30,6 +32,15 @@ buildGoModule {

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/";
Expand Down

0 comments on commit 8134395

Please sign in to comment.