1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 gitMinimal,
6 docutils,
7}:
8
9stdenv.mkDerivation rec {
10 pname = "git-hub";
11 version = "2.1.3";
12
13 src = fetchFromGitHub {
14 owner = "sociomantic-tsunami";
15 repo = "git-hub";
16 rev = "v${version}";
17 sha256 = "sha256-fb/WDmBx1Vayu4fLeG+D1nmHJJawgIAAXcQsABsenBo=";
18 };
19
20 nativeBuildInputs = [
21 gitMinimal # Used during build to generate Bash completion.
22 docutils
23 ];
24
25 postPatch = ''
26 patchShebangs .
27 '';
28
29 enableParallelBuilding = true;
30
31 installFlags = [
32 "prefix=$(out)"
33 "sysconfdir=$(out)/etc"
34 ];
35
36 postInstall = ''
37 # Remove inert ftdetect vim plugin and a README that's a man page subset:
38 rm -r $out/share/{doc,vim}
39 '';
40
41 meta = with lib; {
42 inherit (src.meta) homepage;
43 description = "Git command line interface to GitHub";
44 longDescription = ''
45 A simple command line interface to GitHub, enabling most useful GitHub
46 tasks (like creating and listing pull request or issues) to be accessed
47 directly through the Git command line.
48 '';
49 license = licenses.gpl3Plus;
50 platforms = platforms.all;
51 mainProgram = "git-hub";
52 };
53}