mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
git-cliff: Add man page and shell completion
This commit is contained in:
parent
bc947f541a
commit
c6c76abb2a
@ -4,6 +4,7 @@
|
||||
, rustPlatform
|
||||
, Security
|
||||
, SystemConfiguration
|
||||
, installShellFiles
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@ -26,6 +27,23 @@ rustPlatform.buildRustPackage rec {
|
||||
Security SystemConfiguration
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
export OUT_DIR=$(mktemp -d)
|
||||
|
||||
# Generate shell completions
|
||||
$out/bin/git-cliff-completions
|
||||
installShellCompletion \
|
||||
--bash $OUT_DIR/git-cliff.bash \
|
||||
--fish $OUT_DIR/git-cliff.fish \
|
||||
--zsh $OUT_DIR/_git-cliff
|
||||
|
||||
# Generate man page
|
||||
$out/bin/git-cliff-mangen
|
||||
installManPage $OUT_DIR/git-cliff.1
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Highly customizable Changelog Generator that follows Conventional Commit specifications";
|
||||
homepage = "https://github.com/orhun/git-cliff";
|
||||
|
Loading…
Reference in New Issue
Block a user