3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/git-and-tools/hub/default.nix

45 lines
1.2 KiB
Nix
Raw Normal View History

2019-02-27 21:37:23 +00:00
{ stdenv, buildGoPackage, fetchFromGitHub, groff, Security, utillinux }:
buildGoPackage rec {
pname = "hub";
2019-07-20 03:01:55 +01:00
version = "2.12.3";
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}";
2019-07-20 03:01:55 +01:00
sha256 = "13l4nc3k6vl9x1x0153mwi351j3z266wx0fp7xw2851avrgkk9zg";
};
2019-02-27 21:37:23 +00:00
nativeBuildInputs = [ groff utillinux ];
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
postPatch = ''
patchShebangs .
'';
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"
2015-01-03 23:28:38 +00:00
2019-02-27 21:37:23 +00:00
LC_ALL=C.UTF8 \
make man-pages
cp -vr --parents share/man/man[1-9]/*.[1-9] $bin/
'';
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 ];
platforms = with platforms; unix;
};
}