diff options
Diffstat (limited to 'pkgs/by-name/gi/git-prole/package.nix')
| -rw-r--r-- | pkgs/by-name/gi/git-prole/package.nix | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/pkgs/by-name/gi/git-prole/package.nix b/pkgs/by-name/gi/git-prole/package.nix index dcb17af0894b..ce67f6958484 100644 --- a/pkgs/by-name/gi/git-prole/package.nix +++ b/pkgs/by-name/gi/git-prole/package.nix @@ -1,12 +1,16 @@ { lib, + stdenv, + buildPackages, fetchFromGitHub, rustPlatform, git, - bash, nix-update-script, + installShellFiles, }: let + emulatorAvailable = stdenv.hostPlatform.emulatorAvailable buildPackages; + emulator = stdenv.hostPlatform.emulator buildPackages; version = "0.5.3"; in rustPlatform.buildRustPackage { @@ -20,14 +24,32 @@ rustPlatform.buildRustPackage { hash = "sha256-QwLkByC8gdAnt6geZS285ErdH8nfV3vsWjMF4hTzq9Y="; }; + buildFeatures = [ "clap_mangen" ]; + useFetchCargoVendor = true; cargoHash = "sha256-qghc8HtJfpTYXAwC2xjq8lLlCu419Ttnu/AYapkAulI="; nativeCheckInputs = [ git - bash ]; + nativeBuildInputs = [ + installShellFiles + ]; + + postInstall = lib.optionalString emulatorAvailable '' + manpages=$(mktemp -d) + ${emulator} $out/bin/git-prole manpages "$manpages" + for manpage in "$manpages"/*; do + installManPage "$manpage" + done + + installShellCompletion --cmd git-prole \ + --bash <(${emulator} $out/bin/git-prole completions bash) \ + --fish <(${emulator} $out/bin/git-prole completions fish) \ + --zsh <(${emulator} $out/bin/git-prole completions zsh) + ''; + meta = { homepage = "https://github.com/9999years/git-prole"; changelog = "https://github.com/9999years/git-prole/releases/tag/v${version}"; |
