<commit_before>{ lib
, stdenv
, fetchFromGitHub
, SDL2
, agg
, alsa-lib
, desktop-file-utils
, gtk3
, intltool
, libGLU
, libXmu
, libpcap
, libtool
, lua
, meson
, ninja
, openal
, pkg-config
, soundtouch
, tinyxml
, zlib
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "desmume";
  version = "0.9.13";

  src = fetchFromGitHub {
    owner = "TASVideos";
    repo = "desmume";
    rev = "release_${lib.replaceChars ["."] ["_"] finalAttrs.version}";
    hash = "sha256-vmjKXa/iXLTwtqnG+ZUvOnOQPZROeMpfM5J3Jh/Ynfo=";
  };

  nativeBuildInputs = [
    desktop-file-utils
    intltool
    libtool
    lua
    meson
    ninja
    pkg-config
  ];

  buildInputs = [
    SDL2
    agg
    alsa-lib
    gtk3
    libGLU
    libXmu
    libpcap
    openal
    soundtouch
    tinyxml
    zlib
  ];

  hardeningDisable = [ "format" ];

  preConfigure = ''
    cd desmume/src/frontend/posix
  '';

  mesonFlags = [
    "-Db_pie=true"
    "-Dopenal=true"
    "-Dwifi=true"
  ];

  meta = with lib; {
    homepage = "https://www.github.com/TASVideos/desmume/";
    description = "An open-source Nintendo DS emulator";
    longDescription = ''
      DeSmuME is a freeware emulator for the NDS roms & Nintendo DS Lite games
      created by YopYop156 and now maintained by the TASvideos team. It supports
      many homebrew nds rom demoes as well as a handful of Wireless Multiboot
      demo nds roms. DeSmuME is also able to emulate nearly all of the
      commercial nds rom titles which other DS Emulators aren't.
    '';
    license = licenses.gpl2Plus;
    maintainers = [ maintainers.AndersonTorres ];
    platforms = platforms.unix;
  };
})
# TODO: investigate the patches
# TODO: investigate other platforms
<commit_msg>desmume: mark as broken on linux-aarch64<commit_after>{ lib
, stdenv
, fetchFromGitHub
, SDL2
, agg
, alsa-lib
, desktop-file-utils
, gtk3
, intltool
, libGLU
, libXmu
, libpcap
, libtool
, lua
, meson
, ninja
, openal
, pkg-config
, soundtouch
, tinyxml
, zlib
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "desmume";
  version = "0.9.13";

  src = fetchFromGitHub {
    owner = "TASVideos";
    repo = "desmume";
    rev = "release_${lib.replaceChars ["."] ["_"] finalAttrs.version}";
    hash = "sha256-vmjKXa/iXLTwtqnG+ZUvOnOQPZROeMpfM5J3Jh/Ynfo=";
  };

  nativeBuildInputs = [
    desktop-file-utils
    intltool
    libtool
    lua
    meson
    ninja
    pkg-config
  ];

  buildInputs = [
    SDL2
    agg
    alsa-lib
    gtk3
    libGLU
    libXmu
    libpcap
    openal
    soundtouch
    tinyxml
    zlib
  ];

  hardeningDisable = [ "format" ];

  preConfigure = ''
    cd desmume/src/frontend/posix
  '';

  mesonFlags = [
    "-Db_pie=true"
    "-Dopenal=true"
    "-Dwifi=true"
  ];

  meta = with lib; {
    homepage = "https://www.github.com/TASVideos/desmume/";
    description = "An open-source Nintendo DS emulator";
    longDescription = ''
      DeSmuME is a freeware emulator for the NDS roms & Nintendo DS Lite games
      created by YopYop156 and now maintained by the TASvideos team. It supports
      many homebrew nds rom demoes as well as a handful of Wireless Multiboot
      demo nds roms. DeSmuME is also able to emulate nearly all of the
      commercial nds rom titles which other DS Emulators aren't.
    '';
    license = licenses.gpl2Plus;
    maintainers = [ maintainers.AndersonTorres ];
    platforms = platforms.unix;
    broken = stdenv.isAarch64 && stdenv.isLinux; # ofborg failed
  };
})
# TODO: investigate the patches
# TODO: investigate other platforms

{'fraction_non_alphanumeric': 0.10261512222853894, 'fraction_numerical': 0.010801591813530414, 'mean_word_length': 2.7717041800643085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, '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': '970715', 'n_tokens_mistral': 1349, 'n_tokens_neox': 1284, 'n_words': 318}