<commit_before>{ stdenv, fetchurl, alsaLib, qt48, SDL, fontconfig, freetype, SDL_ttf, xorg }:

assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux";

stdenv.mkDerivation rec {
  version = "0.151.u0-1";
  name    = "sdlmame-${version}";

  src = if stdenv.system == "x86_64-linux"
    then fetchurl {
      url    = "ftp://ftp.archlinux.org/community/os/x86_64/${name}-x86_64.pkg.tar.xz";
      sha256 = "1j9vjxhrhsskrlk5wr7al4wk2hh3983kcva42mqal09bmc8qg3m9";
    }
    else fetchurl {
      url    = "ftp://ftp.archlinux.org/community/os/i686/${name}-i686.pkg.tar.xz";
      sha256 = "1i38j9ml66pyxzm0zzf1fv4lb40f6w47cdgaw846q91pzakkkqn7";
    };

  buildPhase = ''
    sed -i "s|/usr|$out|" bin/sdlmame
  '';

  installPhase = ''
    patchelf \
      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
      --set-rpath "${alsaLib}/lib:${qt48}/lib:${SDL}/lib:${fontconfig}/lib:${freetype}/lib:${SDL_ttf}/lib:${xorg.libX11}/lib:${xorg.libXinerama}/lib:${stdenv.cc.cc}/lib" \
      share/sdlmame/sdlmame

    mkdir -p "$out/bin"
    cp -r bin/sdlmame "$out/bin"
    cp -r share "$out"
  '';

  dontPatchELF = true;
  dontStrip    = true;

  meta = with stdenv.lib; {
    homepage    = http://sdlmame.lngn.net;
    description = "A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support";
    license     = "MAME";
    maintainers = with maintainers; [ lovek323 ];
    platforms   = platforms.linux;
  };
}<commit_msg>sdlmame: mark as broken due to URL cc @lovek323<commit_after>{ stdenv, fetchurl, alsaLib, qt48, SDL, fontconfig, freetype, SDL_ttf, xorg }:

assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux";

stdenv.mkDerivation rec {
  version = "0.151.u0-1";
  name    = "sdlmame-${version}";

  src = if stdenv.system == "x86_64-linux"
    then fetchurl {
      url    = "ftp://ftp.archlinux.org/community/os/x86_64/${name}-x86_64.pkg.tar.xz";
      sha256 = "1j9vjxhrhsskrlk5wr7al4wk2hh3983kcva42mqal09bmc8qg3m9";
    }
    else fetchurl {
      url    = "ftp://ftp.archlinux.org/community/os/i686/${name}-i686.pkg.tar.xz";
      sha256 = "1i38j9ml66pyxzm0zzf1fv4lb40f6w47cdgaw846q91pzakkkqn7";
    };

  buildPhase = ''
    sed -i "s|/usr|$out|" bin/sdlmame
  '';

  installPhase = ''
    patchelf \
      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
      --set-rpath "${alsaLib}/lib:${qt48}/lib:${SDL}/lib:${fontconfig}/lib:${freetype}/lib:${SDL_ttf}/lib:${xorg.libX11}/lib:${xorg.libXinerama}/lib:${stdenv.cc.cc}/lib" \
      share/sdlmame/sdlmame

    mkdir -p "$out/bin"
    cp -r bin/sdlmame "$out/bin"
    cp -r share "$out"
  '';

  dontPatchELF = true;
  dontStrip    = true;

  meta = with stdenv.lib; {
    homepage    = http://sdlmame.lngn.net;
    description = "A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support";
    license     = "MAME";
    maintainers = with maintainers; [ lovek323 ];
    platforms   = platforms.linux;
    broken = true; # URL doesn't work anymore
  };
}
{'fraction_non_alphanumeric': 0.16490765171503957, 'fraction_numerical': 0.05573878627968338, 'mean_word_length': 3.1153324287652646, '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': '2338016', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1241, 'n_words': 200}