git-cliff: Add man page and shell completion (#346697)
This commit is contained in:
commit
6378f273ec
@ -4,6 +4,7 @@
|
|||||||
, rustPlatform
|
, rustPlatform
|
||||||
, Security
|
, Security
|
||||||
, SystemConfiguration
|
, SystemConfiguration
|
||||||
|
, installShellFiles
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
@ -26,6 +27,23 @@ rustPlatform.buildRustPackage rec {
|
|||||||
Security SystemConfiguration
|
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; {
|
meta = with lib; {
|
||||||
description = "Highly customizable Changelog Generator that follows Conventional Commit specifications";
|
description = "Highly customizable Changelog Generator that follows Conventional Commit specifications";
|
||||||
homepage = "https://github.com/orhun/git-cliff";
|
homepage = "https://github.com/orhun/git-cliff";
|
||||||
|
Loading…
Reference in New Issue
Block a user