Merge pull request #292378 from NickCao/vultr-cli-cross
vultr-cli: only generate shell completion when doing native compilation
This commit is contained in:
commit
88ae4498d8
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user