2019-02-17 16:54:29 +00:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, ronn, ruby, groff, Security, utillinux, git, glibcLocales }:
|
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";
|
|
|
|
version = "2.9.0";
|
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}";
|
2019-02-17 16:54:29 +00:00
|
|
|
sha256 = "0yxpr606xx23l8823hjqj16cvjjrwb28c7z08ml1pkfvaf7w4n81";
|
2012-12-12 05:45:43 +00:00
|
|
|
};
|
|
|
|
|
2019-02-17 16:54:29 +00:00
|
|
|
nativeBuildInputs = [ groff ronn utillinux glibcLocales ];
|
2018-10-31 18:32:44 +00:00
|
|
|
buildInputs = [ ruby ] ++
|
2018-06-21 23:12:52 +01:00
|
|
|
stdenv.lib.optional stdenv.isDarwin Security;
|
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}
|
|
|
|
install -D etc/hub.zsh_completion "$bin/share/zsh/site-functions/_hub"
|
2018-12-30 00:38:35 +00:00
|
|
|
install -D etc/hub.bash_completion.sh "$bin/share/bash-completion/completions/hub"
|
2018-06-21 23:12:52 +01:00
|
|
|
install -D etc/hub.fish_completion "$bin/share/fish/vendor_completions.d/hub.fish"
|
2015-01-03 23:28:38 +00:00
|
|
|
|
2019-02-17 16:54:29 +00:00
|
|
|
PATH=$PATH:${git}/bin LC_ALL=en_US.utf-8 make man-pages
|
2018-10-31 18:32:44 +00:00
|
|
|
cp -vr --parents share/man/man[1-9]/*.[1-9] $bin/
|
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;
|
|
|
|
homepage = https://hub.github.com/;
|
|
|
|
maintainers = with maintainers; [ the-kenny ];
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = with platforms; unix;
|
2012-12-12 05:45:43 +00:00
|
|
|
};
|
|
|
|
}
|