1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00

step-cli: install shell completion

This commit is contained in:
DCsunset 2024-08-01 18:51:23 -04:00
parent fc7a83f8b6
commit 81343957e6

View file

@ -1,7 +1,9 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
let
version = "0.27.2";
@ -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/";