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