summary refs log tree commit diff
path: root/pkgs/applications/emulators/bsnes/ares/default.nix
blob: 4cc449ee49f4d509e86eb06bbe5d6a44128c9788 (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
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, wrapGAppsHook
, SDL2
, alsa-lib
, gtk3
, gtksourceview3
, libGL
, libGLU
, libX11
, libXv
, libao
, libpulseaudio
, openal
, udev
}:

stdenv.mkDerivation rec {
  pname = "ares";
  version = "128";

  src = fetchFromGitHub {
    owner = "ares-emulator";
    repo = "ares";
    rev = "v${version}";
    sha256 = "sha256-Ojf1kyColBK0S3DwXjGaAZSl0ljhgiXkfKC11BL2fEc=";
  };

  patches = [
    ./dont-rebuild-on-install.patch
    ./fix-ruby.patch
  ];

  nativeBuildInputs = [
    pkg-config
    wrapGAppsHook
  ];

  buildInputs = [
    SDL2
    alsa-lib
    gtk3
    gtksourceview3
    libGL
    libGLU
    libX11
    libXv
    libao
    libpulseaudio
    openal
    udev
  ];

  enableParallelBuilding = true;

  makeFlags = [
    "-C desktop-ui"
    "local=false"
    "openmp=true"
    "hiro=gtk3"
    "prefix=$(out)"
  ];

  meta = with lib; {
    homepage = "https://ares.dev";
    description = "Open-source multi-system emulator with a focus on accuracy and preservation";
    license = licenses.isc;
    maintainers = with maintainers; [ Madouura ];
    platforms = platforms.linux;
  };
}
# TODO: select between Qt, GTK2 and GTK3
# TODO: support Darwin