3
0
Fork 0
forked from mirrors/nixpkgs

metal-cli: install completion

This commit is contained in:
zowoq 2022-09-22 09:10:17 +10:00
parent e325cbdaa2
commit 2e6a924b5a

View file

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "metal-cli";
@ -18,6 +18,15 @@ buildGoModule rec {
"-X github.com/equinix/metal-cli/cmd.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd metal \
--bash <($out/bin/metal completion bash) \
--fish <($out/bin/metal completion fish) \
--zsh <($out/bin/metal completion zsh)
'';
doCheck = false;
doInstallCheck = true;