<commit_before>{ fetchurl, stdenv, pkgconfig, python, file, bc
, qtbase, qtsvg, hunspell, makeWrapper #, mythes, boost
}:

stdenv.mkDerivation rec {
  version = "2.2.3";
  name = "lyx-${version}";

  src = fetchurl {
    url = "ftp://ftp.lyx.org/pub/lyx/stable/2.2.x/${name}.tar.xz";
    sha256 = "0mrbr24xbdg25gd7w8g76gpmy0a10nrnz0mz47mdjwi441yfpjjg";
  };

  # LaTeX is used from $PATH, as people often want to have it with extra pkgs
  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [
    qtbase qtsvg python file/*for libmagic*/ bc
    hunspell makeWrapper # enchant
  ];

  # bogus configure script tests
  preConfigure = ''
    NIX_CFLAGS_COMPILE+=" $(pkg-config --cflags Qt5Core)"
  '';

  configureFlags = [
    "--enable-qt5"<commit_msg>lyx: remove obsolete pkg-config hack<commit_after>{ fetchurl, stdenv, pkgconfig, python, file, bc
, qtbase, qtsvg, hunspell, makeWrapper #, mythes, boost
}:

stdenv.mkDerivation rec {
  version = "2.2.3";
  name = "lyx-${version}";

  src = fetchurl {
    url = "ftp://ftp.lyx.org/pub/lyx/stable/2.2.x/${name}.tar.xz";
    sha256 = "0mrbr24xbdg25gd7w8g76gpmy0a10nrnz0mz47mdjwi441yfpjjg";
  };

  # LaTeX is used from $PATH, as people often want to have it with extra pkgs
  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [
    qtbase qtsvg python file/*for libmagic*/ bc
    hunspell makeWrapper # enchant
  ];

  configureFlags = [
    "--enable-qt5"
{'fraction_non_alphanumeric': 0.13594306049822064, 'fraction_numerical': 0.03914590747330961, 'mean_word_length': 3.5501618122977345, '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': '6873166', 'n_tokens_mistral': 589, 'n_tokens_neox': 549, 'n_words': 120}