vultr-cli: only generate shell completion when doing native compilation

This commit is contained in:
Nick Cao
2024-02-29 13:48:11 -05:00
parent b5f6e3881a
commit 32c09ed0c9
+2 -2
View File
@@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "vultr-cli";
@@ -17,7 +17,7 @@ buildGoModule rec {
ldflags = [ "-s" "-w" ];
postInstall = ''
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd vultr-cli \
--bash <($out/bin/vultr-cli completion bash) \
--fish <($out/bin/vultr-cli completion fish) \