<commit_before>{ stdenv
, fetchTritonPatch
, fetchurl

, alsa-lib
, dbus
, libxkbcommon
, mesa
, pulseaudio_lib
, systemd_lib
, wayland
, xorg
}:

let
  version = "2.0.4";
in
stdenv.mkDerivation rec {
  name = "SDL-${version}";

  src = fetchurl {
    url = "https://www.libsdl.org/release/SDL2-${version}.tar.gz";
    hashOutput = false;
    sha256 = "da55e540bf6331824153805d58b590a29c39d2d506c6d02fa409aedeab21174b";
  };

  buildInputs = [
    alsa-lib
    dbus
    libxkbcommon
    mesa
    pulseaudio_lib
    systemd_lib
    wayland
    xorg.fixesproto
    xorg.inputproto
    xorg.kbproto
    xorg.libICE
    xorg.libX11
    xorg.libXcursor
    xorg.libXext
    xorg.libXfixes
    xorg.libXi
    xorg.libXinerama
    xorg.libXScrnSaver
    xorg.libXxf86vm
    xorg.scrnsaverproto
    xorg.xextproto
    xorg.xf86vidmodeproto
    xorg.xproto
  ];

  patches = [
    (fetchTritonPatch {
      rev = "8465dfdbd2609209e7c671ab789d5bbab3c26def";
      file = "SDL/fix-wayland.patch";
      sha256 = "79c477c164271a3a5c33490ffffa56c8cec59f1928214d65f0fd50d285e6278a";
    })
  ];

  # There is a build bug with `--disable-static`
  dontDisableStatic = true;

  postInstall = ''
    find $out/lib -name \*.a -delete
  '';

  passthru = {
    srcVerification = fetchurl rec {
      failEarly = true;
      pgpsigUrls = map (n: "${n}.sig") src.urls;
      pgpKeyFingerprint = "1528 635D 8053 A57F 77D1  E086 30A5 9377 A776 3BE6";
      inherit (src) urls outputHash outputHashAlgo;
    };
  };

  meta = with stdenv.lib; {
    maintainers = with maintainers; [
      wkennington
    ];
    platforms = with platforms;
      x86_64-linux;
  };
}<commit_msg>sdl(2): 2.0.4 -> 2.0.5<commit_after>{ stdenv
, fetchurl
, lib

, alsa-lib
, dbus
, libxkbcommon
, mesa
, pulseaudio_lib
, systemd_lib
, wayland
, xorg
}:

let
  version = "2.0.5";
in
stdenv.mkDerivation rec {
  name = "SDL-${version}";

  src = fetchurl {
    url = "https://www.libsdl.org/release/SDL2-${version}.tar.gz";
    hashOutput = false;
    sha256 = "442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785";
  };

  buildInputs = [
    alsa-lib
    dbus
    libxkbcommon
    mesa
    pulseaudio_lib
    systemd_lib
    wayland
    xorg.fixesproto
    xorg.inputproto
    xorg.kbproto
    xorg.libICE
    xorg.libX11
    xorg.libXcursor
    xorg.libXext
    xorg.libXfixes
    xorg.libXi
    xorg.libXinerama
    xorg.libXScrnSaver
    xorg.libXxf86vm
    xorg.scrnsaverproto
    xorg.xextproto
    xorg.xf86vidmodeproto
    xorg.xproto
  ];

  # There is a build bug with `--disable-static`
  dontDisableStatic = true;

  postInstall = ''
    find $out/lib -name \*.a -delete
  '';

  passthru = {
    srcVerification = fetchurl rec {
      failEarly = true;
      pgpsigUrls = map (n: "${n}.sig") src.urls;
      pgpKeyFingerprint = "1528 635D 8053 A57F 77D1  E086 30A5 9377 A776 3BE6";
      inherit (src) urls outputHash outputHashAlgo;
    };
  };

  meta = with lib; {
    description = "Simple Direct Media Layer";
    homepage = http://www.libsdl.org;
    license = licenses.zlib;
    maintainers = with maintainers; [
      wkennington
    ];
    platforms = with platforms;
      x86_64-linux;
  };
}
{'fraction_non_alphanumeric': 0.10650329877474081, 'fraction_numerical': 0.08074143889412504, 'mean_word_length': 2.647193585337915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 3, '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': '948438', 'n_tokens_mistral': 1446, 'n_tokens_neox': 1288, 'n_words': 229}