<commit_before>{ lib, rustPlatform, fetchFromGitHub }:

rustPlatform.buildRustPackage rec {
  pname = "fundoc";
  version = "0.4.2";

  src = fetchFromGitHub {
    owner = "csssr";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-qmsr4bhErpMzS71NhLep0EWimZb/S3aEhMbeBNa5y8E=";
  };

  cargoSha256 = "sha256-G2KRjkccS/rfrb7BtotbG6L4WaVnfwY1UEXLnVBLSzM=";

  meta = with lib; {
    description = "Language agnostic documentation generator";
    homepage = "https://github.com/csssr/fundoc";
    license = licenses.mit;
    maintainers = with maintainers; [ figsoda ];
  };
}<commit_msg>fundoc: patch to work with rust 1.64<commit_after>{ lib, rustPlatform, fetchFromGitHub, fetchpatch }:

rustPlatform.buildRustPackage rec {
  pname = "fundoc";
  version = "0.4.2";

  src = fetchFromGitHub {
    owner = "csssr";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-qmsr4bhErpMzS71NhLep0EWimZb/S3aEhMbeBNa5y8E=";
  };

  cargoPatches = [
    # https://github.com/CSSSR/fundoc/pull/36
    (fetchpatch {
      name = "update-dependencies-for-rust-1.64.patch";
      url = "https://github.com/CSSSR/fundoc/commit/9e0c5f747088467b70bd385fcb8888950351143f.patch";
      hash = "sha256-JUTwMdxxt+2jst9DyqgkblZodBSYJzaDtjiLRQ8mJFU=";
    })
  ];

  cargoHash = "sha256-1gKxFznoGYGme0UicP73FQt8CnI9IeyHJxLgRcLffm0=";

  meta = with lib; {
    description = "Language agnostic documentation generator";
    homepage = "https://github.com/csssr/fundoc";
    license = licenses.mit;
    maintainers = with maintainers; [ figsoda ];
  };
}
{'fraction_non_alphanumeric': 0.1335483870967742, 'fraction_numerical': 0.06064516129032258, 'mean_word_length': 3.743119266055046, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '2545710', 'n_tokens_mistral': 695, 'n_tokens_neox': 638, 'n_words': 92}