9c79402962
* categorize inputs appropriately * only put man pages into share/man; previously we copied other formats as well as intermediate files used in man page generation. (which 'man' complained about but otherwise seemed to ignore)
45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ stdenv, buildGoPackage, fetchFromGitHub, ronn, ruby, groff, Security, utillinux }:
|
|
|
|
buildGoPackage rec {
|
|
name = "hub-${version}";
|
|
version = "2.6.0";
|
|
|
|
goPackagePath = "github.com/github/hub";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "github";
|
|
repo = "hub";
|
|
rev = "v${version}";
|
|
sha256 = "0hxmbpyv2yjxg4v3z50x5ikgcz7mgv5prya8jcpi277vq2s0wwa1";
|
|
};
|
|
|
|
nativeBuildInputs = [ groff ronn utillinux ];
|
|
buildInputs = [ ruby ] ++
|
|
stdenv.lib.optional stdenv.isDarwin Security;
|
|
|
|
postPatch = ''
|
|
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"
|
|
|
|
make man-pages
|
|
cp -vr --parents share/man/man[1-9]/*.[1-9] $bin/
|
|
'';
|
|
|
|
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;
|
|
};
|
|
}
|