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 { 2 lib, 3 fetchFromGitHub, 4 rustPlatform, 5 git, 6 - bash, 7 nix-update-script, 8 }: 9 let 10 version = "0.5.3"; 11 in 12 rustPlatform.buildRustPackage { ··· 20 hash = "sha256-QwLkByC8gdAnt6geZS285ErdH8nfV3vsWjMF4hTzq9Y="; 21 }; 22 23 useFetchCargoVendor = true; 24 cargoHash = "sha256-qghc8HtJfpTYXAwC2xjq8lLlCu419Ttnu/AYapkAulI="; 25 26 nativeCheckInputs = [ 27 git 28 - bash 29 ]; 30 31 meta = { 32 homepage = "https://github.com/9999years/git-prole";
··· 1 { 2 lib, 3 + stdenv, 4 + buildPackages, 5 fetchFromGitHub, 6 rustPlatform, 7 git, 8 nix-update-script, 9 + installShellFiles, 10 }: 11 let 12 + emulatorAvailable = stdenv.hostPlatform.emulatorAvailable buildPackages; 13 + emulator = stdenv.hostPlatform.emulator buildPackages; 14 version = "0.5.3"; 15 in 16 rustPlatform.buildRustPackage { ··· 24 hash = "sha256-QwLkByC8gdAnt6geZS285ErdH8nfV3vsWjMF4hTzq9Y="; 25 }; 26 27 + buildFeatures = [ "clap_mangen" ]; 28 + 29 useFetchCargoVendor = true; 30 cargoHash = "sha256-qghc8HtJfpTYXAwC2xjq8lLlCu419Ttnu/AYapkAulI="; 31 32 nativeCheckInputs = [ 33 git 34 + ]; 35 + 36 + nativeBuildInputs = [ 37 + installShellFiles 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 + ''; 52 53 meta = { 54 homepage = "https://github.com/9999years/git-prole";