@@ -0,0 +1,36 @@
1+{ stdenv, fetchgit, go, ronn, groff, utillinux, Security }:
2+
3+stdenv.mkDerivation rec {
4+ name = "hub-${version}";
5+ version = "2.3.0-pre10";
6+
7+ src = fetchgit {
8+ url = https://github.com/github/hub.git;
9+ rev = "refs/tags/v${version}";
10+ sha256 = "07sz1i6zxx2g36ayhjp1vjw523ckk5b0cr8b80s1qhar2d2hkibd";
11+ };
12+
13+ buildInputs = [ go ronn groff utillinux ]
14+ ++ stdenv.lib.optional stdenv.isDarwin Security;
15+
16+ buildPhase = ''
17+ mkdir bin
18+ ln -s ${ronn}/bin/ronn bin/ronn
19+
20+ patchShebangs .
21+ make all man-pages
22+ '';
23+
24+ installPhase = ''
25+ prefix=$out sh -x < script/install.sh
26+ '';
27+
28+ meta = with stdenv.lib; {
29+ description = "Command-line wrapper for git that makes you better at GitHub";
30+
31+ license = licenses.mit;
32+ homepage = https://hub.github.com/;
33+ maintainers = with maintainers; [ the-kenny ];
34+ platforms = with platforms; unix;
35+ };
36+}