Merge pull request #5565 from kirelagin/hub

gitAndTools.hub: Update to 2.x
This commit is contained in:
Arseniy Seroka 2015-01-10 10:42:19 +03:00
commit 269568b7ea
2 changed files with 37 additions and 18 deletions

View File

@ -73,9 +73,8 @@ rec {
}; };
hub = import ./hub { hub = import ./hub {
inherit (rubyLibs) rake; inherit go;
inherit stdenv fetchurl groff makeWrapper; inherit stdenv fetchgit;
git = gitBase;
}; };
gitFastExport = import ./fast-export { gitFastExport = import ./fast-export {

View File

@ -1,28 +1,48 @@
{ stdenv, fetchurl, git, groff, rake, makeWrapper }: { stdenv, fetchgit, go }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "hub-${version}"; name = "hub-${version}";
version = "1.12.2"; version = "2.2.0-rc1";
src = fetchurl { src = fetchgit {
url = "https://github.com/github/hub/archive/v${version}.tar.gz"; url = https://github.com/github/hub.git;
sha256 = "112yfv9xklsmwv859kypv7hz0a6dj5hkrmjp7z1h40nrljc9mi79"; rev = "refs/tags/v${version}";
sha256 = "1f6r8vlwnmqmr85drfv24vhqx1aacz6s83c2i804v9997n0wrwfm";
}; };
buildInputs = [ rake makeWrapper ];
buildInputs = [ go ];
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
buildPhase = ''
./script/build
'';
installPhase = '' installPhase = ''
rake install "prefix=$out" mkdir -p "$out/bin"
cp hub "$out/bin/"
mkdir -p "$out/share/man/man1"
cp "man/hub.1" "$out/share/man/man1/"
mkdir -p "$out/share/zsh/site-functions"
cp "etc/hub.zsh_completion" "$out/share/zsh/site-functions/_hub"
# Broken: https://github.com/github/hub/issues/592
# mkdir -p "$out/etc/bash_completion.d"
# cp "etc/hub.bash_completion.sh" "$out/etc/bash_completion.d/"
# Should we also install provided git-hooks?
# ?
''; '';
fixupPhase = ''
wrapProgram $out/bin/hub --prefix PATH : ${groff}/bin:${git}/bin
'';
meta = { meta = with stdenv.lib; {
description = "A GitHub specific wrapper for git"; description = "Command-line wrapper for git that makes you better at GitHub";
homepage = "http://defunkt.io/hub/";
license = stdenv.lib.licenses.mit; license = licenses.mit;
maintainers = with stdenv.lib.maintainers; [ the-kenny ]; homepage = https://hub.github.com/;
maintainers = with maintainers; [ the-kenny ];
}; };
} }