gibo: enable shell completions only if emulators are available
This commit is contained in:
parent
9a036b3b36
commit
020ec9e45c
@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
stdenv,
|
||||||
|
buildPackages,
|
||||||
buildGoModule,
|
buildGoModule,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
nix-update-script,
|
nix-update-script,
|
||||||
@ -30,12 +32,17 @@ buildGoModule (finalAttrs: {
|
|||||||
installShellFiles
|
installShellFiles
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (
|
||||||
installShellCompletion --cmd gibo \
|
let
|
||||||
--bash <($out/bin/gibo completion bash) \
|
emulator = stdenv.hostPlatform.emulator buildPackages;
|
||||||
--fish <($out/bin/gibo completion fish) \
|
in
|
||||||
--zsh <($out/bin/gibo completion zsh)
|
''
|
||||||
'';
|
installShellCompletion --cmd gibo \
|
||||||
|
--bash <(${emulator} $out/bin/gibo completion bash) \
|
||||||
|
--fish <(${emulator} $out/bin/gibo completion fish) \
|
||||||
|
--zsh <(${emulator} $out/bin/gibo completion zsh)
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
nativeInstallCheckInputs = [
|
nativeInstallCheckInputs = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user