<commit_before>{ stdenv, fetchurl, automoc4, cmake, perl, pkgconfig, kdelibs, lcms2, libpng, eigen
, exiv2, boost, sqlite, icu, vc, shared_mime_info, librevenge, libodfgen, libwpg
, libwpd, poppler_qt4, ilmbase, gsl, qca2, marble, libvisio, libmysql, postgresql
, freetds, fftw, glew, libkdcraw, pstoedit, opencolorio, kdepimlibs
, kactivities, okular, git, oxygen_icons, makeWrapper
# TODO: not found
#, xbase, openjpeg
# TODO: package libWPS, Spnav, m2mml, LibEtonyek
}:

stdenv.mkDerivation rec {
  name = "calligra-2.9.11";

  src = fetchurl {
    url = "mirror://kde/stable/${name}/${name}.tar.xz";
    sha256 = "02gaahp7a7m53n0hvrp3868s8w37b457isxir0z7b4mwhw7jv3di";
  };

  nativeBuildInputs = [ automoc4 cmake perl pkgconfig makeWrapper ];

  buildInputs = [
    kdelibs lcms2 libpng eigen
    exiv2 boost sqlite icu vc shared_mime_info librevenge libodfgen libwpg
    libwpd poppler_qt4 ilmbase gsl qca2 marble libvisio libmysql postgresql
    freetds fftw glew libkdcraw opencolorio kdepimlibs
    kactivities okular git
  ];

  enableParallelBuilding = true;

  postInstall = ''
    for i in $out/bin/*; do
      wrapProgram $i \
        --prefix PATH ':' "${pstoedit}/bin" \
        --prefix XDG_DATA_DIRS ':' "${oxygen_icons}/share"<commit_msg>treewide: Fix output references to pstoedit<commit_after>{ stdenv, fetchurl, automoc4, cmake, perl, pkgconfig, kdelibs, lcms2, libpng, eigen
, exiv2, boost, sqlite, icu, vc, shared_mime_info, librevenge, libodfgen, libwpg
, libwpd, poppler_qt4, ilmbase, gsl, qca2, marble, libvisio, libmysql, postgresql
, freetds, fftw, glew, libkdcraw, pstoedit, opencolorio, kdepimlibs
, kactivities, okular, git, oxygen_icons, makeWrapper
# TODO: not found
#, xbase, openjpeg
# TODO: package libWPS, Spnav, m2mml, LibEtonyek
}:

stdenv.mkDerivation rec {
  name = "calligra-2.9.11";

  src = fetchurl {
    url = "mirror://kde/stable/${name}/${name}.tar.xz";
    sha256 = "02gaahp7a7m53n0hvrp3868s8w37b457isxir0z7b4mwhw7jv3di";
  };

  nativeBuildInputs = [ automoc4 cmake perl pkgconfig makeWrapper ];

  buildInputs = [
    kdelibs lcms2 libpng eigen
    exiv2 boost sqlite icu vc shared_mime_info librevenge libodfgen libwpg
    libwpd poppler_qt4 ilmbase gsl qca2 marble libvisio libmysql postgresql
    freetds fftw glew libkdcraw opencolorio kdepimlibs
    kactivities okular git
  ];

  enableParallelBuilding = true;

  postInstall = ''
    for i in $out/bin/*; do
      wrapProgram $i \
        --prefix PATH ':' "${pstoedit.out}/bin" \
        --prefix XDG_DATA_DIRS ':' "${oxygen_icons}/share"
{'fraction_non_alphanumeric': 0.10518053375196232, 'fraction_numerical': 0.03139717425431711, 'mean_word_length': 4.234086242299795, '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': '3097887', 'n_tokens_mistral': 1056, 'n_tokens_neox': 997, 'n_words': 236}