<commit_before>{ lib, stdenv, fetchFromGitHub, makeWrapper, nix-update-script
, python3, git, gnupg, less, openssh
}:

stdenv.mkDerivation rec {
  pname = "git-repo";
  version = "2.19";

  src = fetchFromGitHub {
    owner = "android";
    repo = "tools_repo";
    rev = "v${version}";
    sha256 = "sha256-aJnerKeZobgw3e4s7D7de7/nP6vwymLpeKnrLmPzDow=";
  };

  # Fix 'NameError: name 'ssl' is not defined'
  patches = [ ./import-ssl-module.patch ];

  nativeBuildInputs = [ makeWrapper ];
  buildInputs = [ python3 ];

  postPatch = ''
    substituteInPlace repo --replace \
      'urllib.request.urlopen(url)' \
      'urllib.request.urlopen(url, context=ssl.create_default_context())'
  '';

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin
    cp repo $out/bin/repo

    runHook postInstall
  '';
<commit_msg>gitRepo: 2.19 -> 2.20<commit_after>{ lib, stdenv, fetchFromGitHub, makeWrapper, nix-update-script
, python3, git, gnupg, less, openssh
}:

stdenv.mkDerivation rec {
  pname = "git-repo";
  version = "2.20";

  src = fetchFromGitHub {
    owner = "android";
    repo = "tools_repo";
    rev = "v${version}";
    sha256 = "sha256-5yyiQMIoAtaNh9H1pjU1gXAbmU3/VdXGt7AL4wmJC28=";
  };

  # Fix 'NameError: name 'ssl' is not defined'
  patches = [ ./import-ssl-module.patch ];

  nativeBuildInputs = [ makeWrapper ];
  buildInputs = [ python3 ];

  postPatch = ''
    substituteInPlace repo --replace \
      'urllib.request.urlopen(url)' \
      'urllib.request.urlopen(url, context=ssl.create_default_context())'
  '';

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin
    cp repo $out/bin/repo

    runHook postInstall
  '';

{'fraction_non_alphanumeric': 0.14311377245508983, 'fraction_numerical': 0.025748502994011976, 'mean_word_length': 3.2519083969465647, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, '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': '134379', 'n_tokens_mistral': 663, 'n_tokens_neox': 635, 'n_words': 118}