15 version = "unstable-2022-12-01";
17 src = fetchFromGitHub {
20 rev = "38bcd4ae469e5f53f01901340b715c7658ab417a";
21 hash = "sha256-V2GvwKj0m2UXxE42G23OHXyAsTrVRNw1p5CAaJxGYog=";
25 # Fix `fish` completions
26 # https://github.com/github/hub/pull/3036
28 url = "https://github.com/github/hub/commit/439b7699e79471fc789929bcdea2f30bd719963e.patch";
29 hash = "sha256-pR/OkGa2ICR4n1pLNx8E2UTtLeDwFtXxeeTB94KFjC4=";
31 # Fix `bash` completions
32 # https://github.com/github/hub/pull/2948
34 url = "https://github.com/github/hub/commit/64b291006f208fc7db1d5be96ff7db5535f1d853.patch";
35 hash = "sha256-jGFFIvSKEIpTQY0Wz63cqciUk25MzPHv5Z1ox8l7wmo=";
41 sed -i 's/^var Version = "[^"]\+"$/var Version = "${version}"/' version/version.go
44 vendorHash = "sha256-wQH8V9jRgh45JGs4IfYS1GtmCIYdo93JG1UjJ0BGxXk=";
46 # Only needed to build the man-pages
47 excludedPackages = [ "github.com/github/hub/md2roff-bin" ];
57 installShellCompletion --cmd hub \
58 --bash etc/hub.bash_completion.sh \
59 --fish etc/hub.fish_completion \
60 --zsh etc/hub.zsh_completion
62 LC_ALL=C.UTF8 make man-pages
63 installManPage share/man/man[1-9]/*.[1-9]
65 wrapProgram $out/bin/hub \
66 --suffix PATH : ${lib.makeBinPath [ git ]}
73 passthru.tests = { inherit (nixosTests) hub; };
76 description = "Command-line wrapper for git that makes you better at GitHub";
77 homepage = "https://hub.github.com/";
78 license = licenses.mit;
79 maintainers = with maintainers; [ globin ];