<commit_before>{ qtModule, qtbase, qtquickcontrols, wayland, pkg-config, fetchpatch }:

qtModule {
  pname = "qtwayland";
  qtInputs = [ qtbase qtquickcontrols ];
  buildInputs = [ wayland ];
  nativeBuildInputs = [ pkg-config ];
  outputs = [ "out" "dev" "bin" ];
  patches = [
    # NixOS-specific, ensure that app_id is correctly determined for
    # wrapped executables from `wrapQtAppsHook` (see comment in patch for further
    # context).  Beware: shared among different Qt5 versions.
    ./qtwayland-app_id.patch
    # Backport of https://codereview.qt-project.org/c/qt/qtwayland/+/388338
    # Pulled from Fedora as they modified it to not apply to KDE as Plasma 5.x
    # doesn't behave properly with the patch applied. See the discussion at
    # https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/39 for details
    (fetchpatch {
      url = "https://src.fedoraproject.org/rpms/qt5-qtwayland/raw/46376bb00d4c3dd3db2e82ad7ca5301ce16ea4ab/f/0080-Client-set-constraint-adjustments-for-popups-in-xdg.patch";
      sha256 = "sha256-XP+noYCk8fUdA0ItCqMjV7lSXDlNdB7Az9q7NRpupHc=";
    })
  ];
}<commit_msg>qt*.qtwayland: fix build of versions before 5.15<commit_after>{ lib, qtModule, qtbase, qtquickcontrols, wayland, pkg-config, fetchpatch }:

qtModule {
  pname = "qtwayland";
  qtInputs = [ qtbase qtquickcontrols ];
  buildInputs = [ wayland ];
  nativeBuildInputs = [ pkg-config ];
  outputs = [ "out" "dev" "bin" ];
  patches = [
    # NixOS-specific, ensure that app_id is correctly determined for
    # wrapped executables from `wrapQtAppsHook` (see comment in patch for further
    # context).  Beware: shared among different Qt5 versions.
    ./qtwayland-app_id.patch
  ] ++ lib.optional (lib.versionAtLeast qtbase.version "5.15")
    # Backport of https://codereview.qt-project.org/c/qt/qtwayland/+/388338
    # Pulled from Fedora as they modified it to not apply to KDE as Plasma 5.x
    # doesn't behave properly with the patch applied. See the discussion at
    # https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/39 for details
    # This patch won't apply to versions before 5.15.
    (fetchpatch {
      url = "https://src.fedoraproject.org/rpms/qt5-qtwayland/raw/46376bb00d4c3dd3db2e82ad7ca5301ce16ea4ab/f/0080-Client-set-constraint-adjustments-for-popups-in-xdg.patch";
      sha256 = "sha256-XP+noYCk8fUdA0ItCqMjV7lSXDlNdB7Az9q7NRpupHc=";
    });
}
{'fraction_non_alphanumeric': 0.11530398322851153, 'fraction_numerical': 0.0440251572327044, 'mean_word_length': 3.734126984126984, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '3866913', 'n_tokens_mistral': 926, 'n_tokens_neox': 864, 'n_words': 189}