<commit_before>{ lib
, stdenv
, fetchurl
, wrapGAppsHook
, meson
, vala
, pkg-config
, ninja
, itstool
, clutter-gtk
, libgee
, libgnome-games-support
, gnome
, gtk3
}:

stdenv.mkDerivation rec {
  pname = "gnome-twenty-forty-eight";
  version = "3.38.2";

  src = fetchurl {
    url = "mirror://gnome/sources/gnome-2048/${lib.versions.majorMinor version}/gnome-2048-${version}.tar.xz";
    sha256 = "0s5fg4z5in1h39fcr69j1qc5ynmg7a8mfprk3mc3c0csq3snfwz2";
  };

  nativeBuildInputs = [
    itstool
    meson
    ninja
    pkg-config
    vala
    wrapGAppsHook
  ];

  buildInputs = [
    clutter-gtk
    libgee
    libgnome-games-support
    gtk3
  ];

  passthru = {<commit_msg>gnome-2048: fix build with meson 0.61<commit_after>{ lib
, stdenv
, fetchurl
, fetchpatch
, wrapGAppsHook
, meson
, vala
, pkg-config
, ninja
, itstool
, clutter-gtk
, libgee
, libgnome-games-support
, gnome
, gtk3
}:

stdenv.mkDerivation rec {
  pname = "gnome-twenty-forty-eight";
  version = "3.38.2";

  src = fetchurl {
    url = "mirror://gnome/sources/gnome-2048/${lib.versions.majorMinor version}/gnome-2048-${version}.tar.xz";
    sha256 = "0s5fg4z5in1h39fcr69j1qc5ynmg7a8mfprk3mc3c0csq3snfwz2";
  };

  patches = [
    # Fix build with meson 0.61
    # https://gitlab.gnome.org/GNOME/gnome-2048/-/merge_requests/21
    (fetchpatch {
      url = "https://gitlab.gnome.org/GNOME/gnome-2048/-/commit/194e22699f7166a016cd39ba26dd719aeecfc868.patch";
      sha256 = "Qpn/OJJwblRm5Pi453aU2HwbrNjsf+ftmSnns/5qZ9E=";
    })
  ];

  nativeBuildInputs = [
    itstool
    meson
    ninja
    pkg-config
    vala
    wrapGAppsHook
  ];

  buildInputs = [
    clutter-gtk
    libgee
    libgnome-games-support
    gtk3
  ];

  passthru = {
{'fraction_non_alphanumeric': 0.1282051282051282, 'fraction_numerical': 0.07284382284382285, 'mean_word_length': 3.0305164319248825, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3427269', 'n_tokens_mistral': 833, 'n_tokens_neox': 732, 'n_words': 100}