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