You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

default.nix 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. { stdenv, buildGoPackage, fetchFromGitHub, groff, Security, utillinux }:
  2. buildGoPackage rec {
  3. pname = "hub";
  4. version = "2.12.8";
  5. goPackagePath = "github.com/github/hub";
  6. # Only needed to build the man-pages
  7. excludedPackages = [ "github.com/github/hub/md2roff-bin" ];
  8. src = fetchFromGitHub {
  9. owner = "github";
  10. repo = pname;
  11. rev = "v${version}";
  12. sha256 = "0a2dpg0w29nblk1dba9a35bpwwyf0zbqcgrwn4a8diyx27b77x3x";
  13. };
  14. nativeBuildInputs = [ groff utillinux ];
  15. buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
  16. postPatch = ''
  17. patchShebangs .
  18. '';
  19. postInstall = ''
  20. cd go/src/${goPackagePath}
  21. install -D etc/hub.zsh_completion "$bin/share/zsh/site-functions/_hub"
  22. install -D etc/hub.bash_completion.sh "$bin/share/bash-completion/completions/hub"
  23. install -D etc/hub.fish_completion "$bin/share/fish/vendor_completions.d/hub.fish"
  24. LC_ALL=C.UTF8 \
  25. make man-pages
  26. cp -vr --parents share/man/man[1-9]/*.[1-9] $bin/
  27. '';
  28. meta = with stdenv.lib; {
  29. description = "Command-line wrapper for git that makes you better at GitHub";
  30. license = licenses.mit;
  31. homepage = https://hub.github.com/;
  32. maintainers = with maintainers; [ the-kenny globin ];
  33. platforms = with platforms; unix;
  34. };
  35. }