1{ stdenv, fetchurl, unzip, pkgconfig, SDL, gtk, GConf, mesa
2, expat, zlib }:
3
4let
5
6 version = "139";
7
8 mameSrc = fetchurl {
9 url = "http://www.aarongiles.com/mirror/releases/mame0${version}s.zip";
10 sha256 = "1mpkwxfz38cgxzvlni2y3fxas3b8qmnzj2ik2zzbd8mr622jdp79";
11 };
12
13 messSrc = fetchurl {
14 url = "http://mess.redump.net/_media/downloads:mess0${version}s.zip";
15 name = "mess0139s.zip";
16 sha256 = "1v892cg6wn8cdwc8pf1gcqqdb1v1v295r6jw2hf58svwx3h27xyy";
17 };
18
19in
20
21stdenv.mkDerivation {
22 name = "mess-0.${version}";
23
24 unpackPhase =
25 ''
26 unzip ${mameSrc}
27 # Yes, the MAME distribution is a zip file containing a zip file...
28 unzip mame.zip
29 unzip -o ${messSrc}
30 '';
31
32 makeFlags = "TARGET=mess BUILD_EXPAT= BUILD_ZLIB= NOWERROR=1";
33
34 buildInputs =
35 [ unzip pkgconfig SDL gtk GConf mesa expat zlib ];
36
37 installPhase =
38 ''
39 mkdir -p $out/bin
40 cp mess* $out/bin/mess
41 '';
42
43 meta = {
44 homepage = http://www.mess.org/;
45 license = "non-commercial";
46 description = "Multi Emulator Super System, an emulator of many game consoles and computer systems";
47 };
48}