perses: install shell completions for percli program (#445292)

authored by h7x4 and committed by GitHub dcb0810d 6053a40e

+10 -1
+10 -1
pkgs/by-name/pe/perses/package.nix
··· 1 1 { 2 2 lib, 3 + stdenv, 3 4 fetchFromGitHub, 4 5 fetchNpmDeps, 5 6 fetchurl, ··· 8 9 nodejs, 9 10 turbo, 10 11 linkFarm, 12 + installShellFiles, 11 13 }: 12 14 13 15 let ··· 43 45 npmHooks.npmConfigHook 44 46 nodejs 45 47 turbo 48 + installShellFiles 46 49 ]; 47 50 48 51 npmDeps = fetchNpmDeps { ··· 93 96 94 97 postInstall = '' 95 98 cp -r cue "$cue" 96 - ''; 99 + '' 100 + + (lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 101 + installShellCompletion --cmd percli \ 102 + --bash <($out/bin/percli completion bash) \ 103 + --zsh <($out/bin/percli completion zsh) \ 104 + --fish <($out/bin/percli completion fish) 105 + ''); 97 106 98 107 doInstallCheck = true; 99 108 installCheckPhase = ''