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 { 2 lib, 3 fetchFromGitHub, 4 fetchNpmDeps, 5 fetchurl, ··· 8 nodejs, 9 turbo, 10 linkFarm, 11 }: 12 13 let ··· 43 npmHooks.npmConfigHook 44 nodejs 45 turbo 46 ]; 47 48 npmDeps = fetchNpmDeps { ··· 93 94 postInstall = '' 95 cp -r cue "$cue" 96 - ''; 97 98 doInstallCheck = true; 99 installCheckPhase = ''
··· 1 { 2 lib, 3 + stdenv, 4 fetchFromGitHub, 5 fetchNpmDeps, 6 fetchurl, ··· 9 nodejs, 10 turbo, 11 linkFarm, 12 + installShellFiles, 13 }: 14 15 let ··· 45 npmHooks.npmConfigHook 46 nodejs 47 turbo 48 + installShellFiles 49 ]; 50 51 npmDeps = fetchNpmDeps { ··· 96 97 postInstall = '' 98 cp -r cue "$cue" 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 + ''); 106 107 doInstallCheck = true; 108 installCheckPhase = ''