gitAndTools.hub: use installShellFiles

This commit is contained in:
zowoq 2020-04-26 13:16:53 +10:00
parent 0bead921ca
commit e75465256b

View File

@ -1,4 +1,4 @@
{ stdenv, buildGoPackage, fetchFromGitHub, groff, utillinux }:
{ stdenv, buildGoPackage, fetchFromGitHub, groff, installShellFiles, utillinux }:
buildGoPackage rec {
pname = "hub";
@ -16,7 +16,7 @@ buildGoPackage rec {
sha256 = "1qjab3dpia1jdlszz3xxix76lqrm4zbmqzd9ymld7h06awzsg2vh";
};
nativeBuildInputs = [ groff utillinux ];
nativeBuildInputs = [ groff installShellFiles utillinux ];
postPatch = ''
patchShebangs .
@ -24,13 +24,13 @@ buildGoPackage rec {
postInstall = ''
cd go/src/${goPackagePath}
install -D etc/hub.zsh_completion "$bin/share/zsh/site-functions/_hub"
install -D etc/hub.bash_completion.sh "$bin/share/bash-completion/completions/hub"
install -D etc/hub.fish_completion "$bin/share/fish/vendor_completions.d/hub.fish"
installShellCompletion --zsh --name _hub etc/hub.zsh_completion
installShellCompletion --bash --name hub etc/hub.bash_completion.sh
installShellCompletion --fish --name hub.fish etc/hub.fish_completion
LC_ALL=C.UTF8 \
make man-pages
cp -vr --parents share/man/man[1-9]/*.[1-9] $bin/
installManPage share/man/man[1-9]/*.[1-9]
'';
meta = with stdenv.lib; {