summary refs log tree commit diff
path: root/pkgs/misc/emulators/zsnes/default.nix
blob: a2896e70d174fa0766eaedcbadcee29f5545f6c6 (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
{stdenv, fetchurl, nasm, SDL, zlib, libpng, ncurses, mesa}:

stdenv.mkDerivation {
  name = "zsnes-1.51";

  src = fetchurl {
    url = mirror://sourceforge/zsnes/zsnes151src.tar.bz2;
    sha256 = "08s64qsxziv538vmfv38fg1rfrz5k95dss5zdkbfxsbjlbdxwmi8";
  };

  # copied from arch linux, fixes gcc-4.8 compatibility
  patches = [ ./zsnes.patch ];

  postPatch = ''
    patch -p0 < ${./zsnes-1.51-libpng15.patch}
  '';

  preConfigure = ''
    cd src
  '';

  buildInputs = [ nasm SDL zlib libpng ncurses mesa ];

  configureFlags = "--enable-release";

  meta = {
    description = "A Super Nintendo Entertainment System Emulator";
    license = "GPLv2+";
    maintainers = [ stdenv.lib.maintainers.sander ];
    homepage = http://www.zsnes.com;
  };
}