about summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-and-tools
diff options
context:
space:
mode:
authorzowoq <59103226+zowoq@users.noreply.github.com>2020-04-26 13:16:53 +1000
committerzowoq <59103226+zowoq@users.noreply.github.com>2020-04-27 08:48:42 +1000
commite75465256b44f6fcf38fa1a853a02f583e9710cf (patch)
tree23463caf3e21451a779b772a896f75cab789e19e /pkgs/applications/version-management/git-and-tools
parent0bead921ca637672c3dfc545e2c7d649370388b9 (diff)
downloadnixlib-e75465256b44f6fcf38fa1a853a02f583e9710cf.tar
nixlib-e75465256b44f6fcf38fa1a853a02f583e9710cf.tar.gz
nixlib-e75465256b44f6fcf38fa1a853a02f583e9710cf.tar.bz2
nixlib-e75465256b44f6fcf38fa1a853a02f583e9710cf.tar.lz
nixlib-e75465256b44f6fcf38fa1a853a02f583e9710cf.tar.xz
nixlib-e75465256b44f6fcf38fa1a853a02f583e9710cf.tar.zst
nixlib-e75465256b44f6fcf38fa1a853a02f583e9710cf.zip
gitAndTools.hub: use installShellFiles
Diffstat (limited to 'pkgs/applications/version-management/git-and-tools')
-rw-r--r--pkgs/applications/version-management/git-and-tools/hub/default.nix12
1 files changed, 6 insertions, 6 deletions
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 8890cd5eb238..9dbb497c8c9e 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; {