<commit_before>{ stdenv, lib, fetchpatch, fetchFromGitHub, cmake, nasm
, gtk2, glib, ffmpeg, alsaLib, libmad, libogg, libvorbis
, glew, libpulseaudio
}:

stdenv.mkDerivation rec {
  name = "stepmania-${version}";
  version = "5.0.10";

  src = fetchFromGitHub {
    owner = "stepmania";
    repo  = "stepmania";
    rev   = "v${version}";
    sha256 = "174gzvk42gwm56hpkz51csad9xi4dg466xv0mf1z39xd7mqd5j5w";
  };

  nativeBuildInputs = [ cmake nasm ];

  buildInputs = [
    gtk2 glib ffmpeg alsaLib libmad libogg libvorbis
    glew libpulseaudio
  ];

  cmakeFlags = [
    "-DWITH_SYSTEM_FFMPEG=1"
    "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
    "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
  ];

  patches = [
    # Fix compilation on i686
    (fetchpatch {
      url = "https://github.com/stepmania/stepmania/commit/f1e114aa03c90884946427bb43a75badec21f163.patch";
      sha256 = "1cm14w92dilqvlyqfffiihf09ra97hxzgfal5gx08brc3j1yyzdw";
    })
  ];

  postInstall = ''
    mkdir -p $out/bin
    ln -s $out/stepmania-5.0/stepmania $out/bin/stepmania
  '';

  enableParallelBuilding = true;

  meta = with lib; {
    homepage = "http://www.stepmania.com/";
    description = "Free dance and rhythm game for Windows, Mac, and Linux";
    platforms = platforms.linux;<commit_msg>stepmania: 5.0.10 -> 5.0.12<commit_after>{ stdenv, lib, fetchpatch, fetchFromGitHub, cmake, nasm
, gtk2, glib, ffmpeg, alsaLib, libmad, libogg, libvorbis
, glew, libpulseaudio, udev
}:

stdenv.mkDerivation rec {
  name = "stepmania-${version}";
  version = "5.0.12";

  src = fetchFromGitHub {
    owner = "stepmania";
    repo  = "stepmania";
    rev   = "v${version}";
    sha256 = "0ig5pnw78j45b35kfr76phaqbac9b2f6wg3c63l6mf0nrq17wslz";
  };

  nativeBuildInputs = [ cmake nasm ];

  buildInputs = [
    gtk2 glib ffmpeg alsaLib libmad libogg libvorbis
    glew libpulseaudio udev
  ];

  cmakeFlags = [
    "-DWITH_SYSTEM_FFMPEG=1"
    "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
    "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
  ];

  postInstall = ''
    mkdir -p $out/bin
    ln -s $out/stepmania-5.0/stepmania $out/bin/stepmania
  '';

  enableParallelBuilding = true;

  meta = with lib; {
    homepage = "http://www.stepmania.com/";
    description = "Free dance and rhythm game for Windows, Mac, and Linux";
    platforms = platforms.linux;
{'fraction_non_alphanumeric': 0.13272501036914144, 'fraction_numerical': 0.05516383243467441, 'mean_word_length': 3.5168539325842696, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, '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': '3930118', 'n_tokens_mistral': 1049, 'n_tokens_neox': 969, 'n_words': 167}