<commit_before>{ stdenv, fetchurl, python, pyqt5, sip_4_16, poppler, pkgconfig, libpng
, imagemagick, libjpeg, fontconfig, podofo, qt5, icu, sqlite
, pil, makeWrapper, unrar, chmlib, pythonPackages, xz, libusb1, libmtp
, xdg_utils
}:

stdenv.mkDerivation rec {
  name = "calibre-2.26.0";

  src = fetchurl {
    url = "mirror://sourceforge/calibre/${name}.tar.xz";
    sha256 = "0340cdxbdwvckmz3zygwx1wbn62wxap0545nsimpfq4ln7dcxrfw";
  };

  inherit python;

  patchPhase = ''
    sed -i "/pyqt_sip_dir/ s:=.*:= '${pyqt5}/share/sip':"  \
      setup/build_environment.py
  '';

  nativeBuildInputs = [ makeWrapper pkgconfig ];

  buildInputs =
    [ python pyqt5 sip_4_16 poppler libpng imagemagick libjpeg<commit_msg>calibre: update from 2.26.0 to 2.27.0<commit_after>{ stdenv, fetchurl, python, pyqt5, sip_4_16, poppler, pkgconfig, libpng
, imagemagick, libjpeg, fontconfig, podofo, qt5, icu, sqlite
, pil, makeWrapper, unrar, chmlib, pythonPackages, xz, libusb1, libmtp
, xdg_utils
}:

stdenv.mkDerivation rec {
  name = "calibre-2.27.0";

  src = fetchurl {
    url = "mirror://sourceforge/calibre/${name}.tar.xz";
    sha256 = "13id1r2q6alw4wzb4z0njkyr6lsmzs2fjp3cflqavx3qk25darv5";
  };

  inherit python;

  patchPhase = ''
    sed -i "/pyqt_sip_dir/ s:=.*:= '${pyqt5}/share/sip':"  \
      setup/build_environment.py
  '';

  nativeBuildInputs = [ makeWrapper pkgconfig ];

  buildInputs =
    [ python pyqt5 sip_4_16 poppler libpng imagemagick libjpeg
{'fraction_non_alphanumeric': 0.13356164383561644, 'fraction_numerical': 0.05, 'mean_word_length': 4.108391608391608, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3213991', 'n_tokens_mistral': 650, 'n_tokens_neox': 604, 'n_words': 114}