about summary refs log tree commit diff
path: root/pkgs/applications/emulators/desmume/default.nix
blob: 5472069f416814f059f4c0ec744637eb1a726a39 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{ 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