2020-05-03 17:38:23 +00:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, groff, installShellFiles, utillinux }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "hub";
|
|
|
|
version = "2.14.2";
|
|
|
|
|
|
|
|
goPackagePath = "github.com/github/hub";
|
|
|
|
|
|
|
|
# Only needed to build the man-pages
|
|
|
|
excludedPackages = [ "github.com/github/hub/md2roff-bin" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "github";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1qjab3dpia1jdlszz3xxix76lqrm4zbmqzd9ymld7h06awzsg2vh";
|
|
|
|
};
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
nativeBuildInputs = [ groff installShellFiles utillinux ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cd go/src/${goPackagePath}
|
2020-05-03 17:38:23 +00:00
|
|
|
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
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
LC_ALL=C.UTF8 \
|
|
|
|
make man-pages
|
2020-05-03 17:38:23 +00:00
|
|
|
installManPage share/man/man[1-9]/*.[1-9]
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Command-line wrapper for git that makes you better at GitHub";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://hub.github.com/";
|
2020-05-15 21:57:56 +00:00
|
|
|
maintainers = with maintainers; [ globin ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = with platforms; unix;
|
|
|
|
};
|
|
|
|
}
|