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

44 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, buildGoPackage, fetchFromGitHub, ronn, ruby, groff, Security, utillinux }:
buildGoPackage rec {
name = "hub-${version}";
2018-07-16 16:55:13 +01:00
version = "2.5.0";
goPackagePath = "github.com/github/hub";
src = fetchFromGitHub {
owner = "github";
repo = "hub";
rev = "v${version}";
2018-07-16 16:55:13 +01:00
sha256 = "03nj3b17m700l3pib9jlzxz2vh8w54srv6x63l53sb4dff3izfsz";
};
buildInputs = [ groff ronn ruby utillinux ] ++
stdenv.lib.optional stdenv.isDarwin Security;
postPatch = ''
2018-05-30 13:44:47 +01:00
mkdir bin
ln -s ${ronn}/bin/ronn bin/ronn
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/etc/bash_completion.d/hub.bash_completion.sh"
install -D etc/hub.fish_completion "$bin/share/fish/vendor_completions.d/hub.fish"
2015-01-03 23:28:38 +00:00
make man-pages
cp -r share/man $bin/share/man
'';
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;
};
}