2020-11-24 07:29:28 -08:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, groff, installShellFiles, util-linux }:
|
2012-12-11 21:45:43 -08:00
|
|
|
|
2018-06-21 15:12:52 -07:00
|
|
|
buildGoPackage rec {
|
2019-02-17 08:54:29 -08:00
|
|
|
pname = "hub";
|
2020-03-12 02:20:00 -07:00
|
|
|
version = "2.14.2";
|
2012-12-11 21:45:43 -08:00
|
|
|
|
2018-06-21 15:12:52 -07:00
|
|
|
goPackagePath = "github.com/github/hub";
|
|
|
|
|
2019-02-17 08:54:29 -08:00
|
|
|
# Only needed to build the man-pages
|
|
|
|
excludedPackages = [ "github.com/github/hub/md2roff-bin" ];
|
|
|
|
|
2018-06-21 15:12:52 -07:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "github";
|
2019-02-17 08:54:29 -08:00
|
|
|
repo = pname;
|
2018-06-21 15:12:52 -07:00
|
|
|
rev = "v${version}";
|
2020-03-12 02:20:00 -07:00
|
|
|
sha256 = "1qjab3dpia1jdlszz3xxix76lqrm4zbmqzd9ymld7h06awzsg2vh";
|
2012-12-11 21:45:43 -08:00
|
|
|
};
|
|
|
|
|
2020-11-24 07:29:28 -08:00
|
|
|
nativeBuildInputs = [ groff installShellFiles util-linux ];
|
2015-02-17 19:30:59 -08:00
|
|
|
|
2018-06-21 15:12:52 -07:00
|
|
|
postPatch = ''
|
2015-02-17 19:30:59 -08:00
|
|
|
patchShebangs .
|
2012-12-11 21:45:43 -08:00
|
|
|
'';
|
|
|
|
|
2018-06-21 15:12:52 -07:00
|
|
|
postInstall = ''
|
|
|
|
cd go/src/${goPackagePath}
|
2020-04-25 20:16:53 -07: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
|
2015-01-03 15:28:38 -08:00
|
|
|
|
2019-02-27 13:37:23 -08:00
|
|
|
LC_ALL=C.UTF8 \
|
|
|
|
make man-pages
|
2020-04-25 20:16:53 -07:00
|
|
|
installManPage share/man/man[1-9]/*.[1-9]
|
2012-12-11 21:45:43 -08:00
|
|
|
'';
|
|
|
|
|
2015-01-03 15:28:38 -08:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Command-line wrapper for git that makes you better at GitHub";
|
|
|
|
license = licenses.mit;
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://hub.github.com/";
|
2020-05-09 02:25:07 -07:00
|
|
|
maintainers = with maintainers; [ globin ];
|
2016-08-02 10:50:55 -07:00
|
|
|
platforms = with platforms; unix;
|
2012-12-11 21:45:43 -08:00
|
|
|
};
|
|
|
|
}
|