<commit_before>{ stdenv, fetchgit, go }:

stdenv.mkDerivation rec {
  name = "hub-${version}";
  version = "2.2.0-rc1";

  src = fetchgit {
    url = https://github.com/github/hub.git;
    rev = "refs/tags/v${version}";
    sha256 = "1f6r8vlwnmqmr85drfv24vhqx1aacz6s83c2i804v9997n0wrwfm";
  };


  buildInputs = [ go ];

  phases = [ "unpackPhase" "buildPhase" "installPhase" ];

  buildPhase = ''
    ./script/build
  '';

  installPhase = ''
    mkdir -p "$out/bin"
    cp hub "$out/bin/"

    mkdir -p "$out/share/man/man1"
    cp "man/hub.1" "$out/share/man/man1/"

    mkdir -p "$out/share/zsh/site-functions"
    cp "etc/hub.zsh_completion" "$out/share/zsh/site-functions/_hub"

# Broken: https://github.com/github/hub/issues/592
#    mkdir -p "$out/etc/bash_completion.d"
#    cp "etc/hub.bash_completion.sh" "$out/etc/bash_completion.d/"

# Should we also install provided git-hooks?
# ?
  '';


  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 ];
  };
}
<commit_msg>hub: Fix build with chrooted Nix.<commit_after>{ stdenv, fetchgit, go }:

stdenv.mkDerivation rec {
  name = "hub-${version}";
  version = "2.2.0-rc1";

  src = fetchgit {
    url = https://github.com/github/hub.git;
    rev = "refs/tags/v${version}";
    sha256 = "1f6r8vlwnmqmr85drfv24vhqx1aacz6s83c2i804v9997n0wrwfm";
  };


  buildInputs = [ go ];

  phases = [ "unpackPhase" "buildPhase" "installPhase" ];

  buildPhase = ''
    sh script/build
  '';

  installPhase = ''
    mkdir -p "$out/bin"
    cp hub "$out/bin/"

    mkdir -p "$out/share/man/man1"
    cp "man/hub.1" "$out/share/man/man1/"

    mkdir -p "$out/share/zsh/site-functions"
    cp "etc/hub.zsh_completion" "$out/share/zsh/site-functions/_hub"

# Broken: https://github.com/github/hub/issues/592
#    mkdir -p "$out/etc/bash_completion.d"
#    cp "etc/hub.bash_completion.sh" "$out/etc/bash_completion.d/"

# Should we also install provided git-hooks?
# ?
  '';


  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 ];
  };
}

{'fraction_non_alphanumeric': 0.16587881392350667, 'fraction_numerical': 0.028362698753760206, 'mean_word_length': 2.9863013698630136, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2370108', 'n_tokens_mistral': 954, 'n_tokens_neox': 889, 'n_words': 168}