From d5a849cb0fc23af09f1a668e46d20510cf446884 Mon Sep 17 00:00:00 2001 From: Bryan Lai Date: Fri, 16 Feb 2024 23:39:16 +0800 Subject: [PATCH] git-branchless: install man pages This fixes the failure of `git cmd --help` where `cmd` is some git-branchless alias. The error is due to a quirk of git: when supplied with the long form `--help` flag, the git binary eats the flag and instead look for man page of `cmd`. This errors out unless the man page for `cmd` is properly installed. In the case of `git-branchless`, this can be achieved with the command `git-branchless install-man-pages`, as implemented in this patch. --- .../version-management/git-branchless/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/version-management/git-branchless/default.nix b/pkgs/applications/version-management/git-branchless/default.nix index 6bcfb0a6cdc7..a8041f2698bb 100644 --- a/pkgs/applications/version-management/git-branchless/default.nix +++ b/pkgs/applications/version-management/git-branchless/default.nix @@ -37,6 +37,10 @@ rustPlatform.buildRustPackage rec { libiconv ]; + postInstall = '' + $out/bin/git-branchless install-man-pages $out/share/man + ''; + preCheck = '' export TEST_GIT=${git}/bin/git export TEST_GIT_EXEC_PATH=$(${git}/bin/git --exec-path)