diff --git a/pkgs/applications/version-management/git-and-tools/hub/default.nix b/pkgs/applications/version-management/git-and-tools/hub/default.nix index 8890cd5eb23..9dbb497c8c9 100644 --- a/pkgs/applications/version-management/git-and-tools/hub/default.nix +++ b/pkgs/applications/version-management/git-and-tools/hub/default.nix @@ -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; {