osrm-backend: fix build with boost187 (#379056)
[NixPkgs.git] / pkgs / applications / version-management / git-cliff / default.nix
bloba8c2adba6ee6831e41eecd6baa23b470c6482a6f
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , rustPlatform
5 , installShellFiles
6 }:
8 rustPlatform.buildRustPackage rec {
9   pname = "git-cliff";
10   version = "2.8.0";
12   src = fetchFromGitHub {
13     owner = "orhun";
14     repo = "git-cliff";
15     rev = "v${version}";
16     hash = "sha256-B421xXt7TrBJVwi04vygnw9t5o7/KLVpuItQtwV4E24=";
17   };
19   cargoHash = "sha256-geg6gdPKUBJBJI/TpW5m+/q/7M7kmIlrU2UAauctFOM=";
21   # attempts to run the program on .git in src which is not deterministic
22   doCheck = false;
24   nativeBuildInputs = [ installShellFiles ];
26   postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
27     export OUT_DIR=$(mktemp -d)
29     # Generate shell completions
30     $out/bin/git-cliff-completions
31     installShellCompletion \
32       --bash $OUT_DIR/git-cliff.bash \
33       --fish $OUT_DIR/git-cliff.fish \
34       --zsh $OUT_DIR/_git-cliff
36     # Generate man page
37     $out/bin/git-cliff-mangen
38     installManPage $OUT_DIR/git-cliff.1
39   '';
41   meta = with lib; {
42     description = "Highly customizable Changelog Generator that follows Conventional Commit specifications";
43     homepage = "https://github.com/orhun/git-cliff";
44     changelog = "https://github.com/orhun/git-cliff/blob/v${version}/CHANGELOG.md";
45     license = licenses.gpl3Only;
46     maintainers = with maintainers; [
47       siraben
48       matthiasbeyer
49     ];
50     mainProgram = "git-cliff";
51   };