<commit_before>{ lib, fetchFromGitHub, python3Packages, unstableGitUpdater, gnupg }:

python3Packages.buildPythonApplication rec {
  pname = "apt-offline";
  version = "unstable-2021-07-25";

  src = fetchFromGitHub {
    owner = "rickysarraf";
    repo = pname;
    rev = "7cfa5fc2736be2c832d0ddfa9255175a1f33158d";
    sha256 = "xX2wcvqoPdgqBAWvQmSd//YWMC4pPmrq0vQjhDUKwEA=";
  };

  postPatch = ''
    substituteInPlace org.debian.apt.aptoffline.policy \<commit_msg>apt-offline: unstable-2021-07-25 -> unstable-2022-02-06<commit_after>{ lib, fetchFromGitHub, python3Packages, unstableGitUpdater, gnupg }:

python3Packages.buildPythonApplication rec {
  pname = "apt-offline";
  version = "unstable-2022-02-06";

  src = fetchFromGitHub {
    owner = "rickysarraf";
    repo = pname;
    rev = "2b9929773ff2b6e53d30c50c31fb3a1605631f5f";
    sha256 = "mf2NM39ql6KR/YTWPYNyVe+bvWmUFYfxt5BGmU5WFpQ=";
  };

  postPatch = ''
    substituteInPlace org.debian.apt.aptoffline.policy \
{'fraction_non_alphanumeric': 0.11836734693877551, 'fraction_numerical': 0.10408163265306122, 'mean_word_length': 4.5423728813559325, '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': '1444513', 'n_tokens_mistral': 477, 'n_tokens_neox': 404, 'n_words': 52}