1{ stdenv, fetchurl, perl, gettext, libpng, giflib, libjpeg, alsaLib, readline, mesa, libX11
2, pkgconfig, gtk, SDL, autoconf, automake, makeDesktopItem
3}:
4
5stdenv.mkDerivation rec {
6 name = "vice-2.2";
7 src = fetchurl {
8 url = http://www.zimmers.net/anonftp/pub/cbm/crossplatform/emulators/VICE/vice-2.2.tar.gz;
9 sha256 = "0l8mp9ybx494fdqgr1ps4x3c3qzms4yyg4hzcn3ihzy92zw1nn2x";
10 };
11 buildInputs = [ perl gettext libpng giflib libjpeg alsaLib readline mesa
12 pkgconfig gtk SDL autoconf automake ];
13 configureFlags = "--with-sdl --enable-fullscreen --enable-gnomeui";
14
15 desktopItem = makeDesktopItem {
16 name = "vice";
17 exec = "x64";
18 comment = "Commodore 64 emulator";
19 desktopName = "VICE";
20 genericName = "Commodore 64 emulator";
21 categories = "Application;Emulator;";
22 };
23
24 patchPhase = ''
25 # Disable font-cache update
26
27 sed -i -e "s|install: install-data-am|install-no: install-data-am|" data/fonts/Makefile.am
28 autoreconf -f -i
29 '';
30
31 NIX_LDFLAGS = "-lX11 -L${libX11}/lib";
32
33 postInstall = ''
34 mkdir -p $out/share/applications
35 cp ${desktopItem}/share/applications/* $out/share/applications
36 '';
37
38 meta = {
39 description = "Commodore 64, 128 and other emulators";
40 homepage = http://www.viceteam.org;
41 license = stdenv.lib.licenses.gpl2Plus;
42 maintainers = [ stdenv.lib.maintainers.sander ];
43 };
44}