<commit_before>{ stdenv, fetchurl, fetchpatch, poppler_utils, pkgconfig, libpng
, imagemagick, libjpeg, fontconfig, podofo, qtbase, qmake, icu, sqlite
, makeWrapper, unrarSupport ? false, chmlib, python2Packages, xz, libusb1, libmtp
, xdg_utils, makeDesktopItem, wrapGAppsHook
}:

stdenv.mkDerivation rec {
  version = "3.22.1";
  name = "calibre-${version}";

  src = fetchurl {
    url = "https://download.calibre-ebook.com/${version}/${name}.tar.xz";
    sha256 = "1nd8pbcfpfw9b26511mhvsvjyfmgnfpdmzwhi7wpkx36wpa4sask";
  };

  patches = [
    # Patches from Debian that:<commit_msg>calibre: 3.22.1 -> 3.23.0<commit_after>{ stdenv, fetchurl, fetchpatch, poppler_utils, pkgconfig, libpng
, imagemagick, libjpeg, fontconfig, podofo, qtbase, qmake, icu, sqlite
, makeWrapper, unrarSupport ? false, chmlib, python2Packages, xz, libusb1, libmtp
, xdg_utils, makeDesktopItem, wrapGAppsHook
}:

stdenv.mkDerivation rec {
  version = "3.23.0";
  name = "calibre-${version}";

  src = fetchurl {
    url = "https://download.calibre-ebook.com/${version}/${name}.tar.xz";
    sha256 = "0ds3i3dhkgpwa3c1lcq4zjmiaza8k9and0lbqqw4i6jrnpk691f9";
  };

  patches = [
    # Patches from Debian that:
{'fraction_non_alphanumeric': 0.13766891891891891, 'fraction_numerical': 0.044763513513513514, 'mean_word_length': 4.895522388059701, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2754923', 'n_tokens_mistral': 515, 'n_tokens_neox': 480, 'n_words': 87}