lol

git-prole: add shell completions (#397508)

authored by

Aleksana and committed by
GitHub
dd396646 af39bcec

+24 -2
+24 -2
pkgs/by-name/gi/git-prole/package.nix
··· 1 1 { 2 2 lib, 3 + stdenv, 4 + buildPackages, 3 5 fetchFromGitHub, 4 6 rustPlatform, 5 7 git, 6 - bash, 7 8 nix-update-script, 9 + installShellFiles, 8 10 }: 9 11 let 12 + emulatorAvailable = stdenv.hostPlatform.emulatorAvailable buildPackages; 13 + emulator = stdenv.hostPlatform.emulator buildPackages; 10 14 version = "0.5.3"; 11 15 in 12 16 rustPlatform.buildRustPackage { ··· 20 24 hash = "sha256-QwLkByC8gdAnt6geZS285ErdH8nfV3vsWjMF4hTzq9Y="; 21 25 }; 22 26 27 + buildFeatures = [ "clap_mangen" ]; 28 + 23 29 useFetchCargoVendor = true; 24 30 cargoHash = "sha256-qghc8HtJfpTYXAwC2xjq8lLlCu419Ttnu/AYapkAulI="; 25 31 26 32 nativeCheckInputs = [ 27 33 git 28 - bash 34 + ]; 35 + 36 + nativeBuildInputs = [ 37 + installShellFiles 29 38 ]; 39 + 40 + postInstall = lib.optionalString emulatorAvailable '' 41 + manpages=$(mktemp -d) 42 + ${emulator} $out/bin/git-prole manpages "$manpages" 43 + for manpage in "$manpages"/*; do 44 + installManPage "$manpage" 45 + done 46 + 47 + installShellCompletion --cmd git-prole \ 48 + --bash <(${emulator} $out/bin/git-prole completions bash) \ 49 + --fish <(${emulator} $out/bin/git-prole completions fish) \ 50 + --zsh <(${emulator} $out/bin/git-prole completions zsh) 51 + ''; 30 52 31 53 meta = { 32 54 homepage = "https://github.com/9999years/git-prole";