summary refs log tree commit diff
path: root/pkgs/misc/emulators/vice/default.nix
blob: dd2c2380a8e013b01e35d6331f5eebe92567b72e (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
{ stdenv, fetchurl, perl, libpng, giflib, libjpeg, alsaLib, readline, mesa, libX11
, pkgconfig, gtk, SDL, autoreconfHook, makeDesktopItem
}:

stdenv.mkDerivation rec {
  name = "vice-2.2";

  src = fetchurl {
    url = http://www.zimmers.net/anonftp/pub/cbm/crossplatform/emulators/VICE/vice-2.2.tar.gz;
    sha256 = "0l8mp9ybx494fdqgr1ps4x3c3qzms4yyg4hzcn3ihzy92zw1nn2x";
  };

  buildInputs = [ perl libpng giflib libjpeg alsaLib readline mesa
                  pkgconfig gtk SDL autoreconfHook ];
  configureFlags = "--with-sdl --enable-fullscreen --enable-gnomeui";

  desktopItem = makeDesktopItem {
    name = "vice";
    exec = "x64";
    comment = "Commodore 64 emulator";
    desktopName = "VICE";
    genericName = "Commodore 64 emulator";
    categories = "Application;Emulator;";
  };

  patchPhase = ''
    # Disable font-cache update
    sed -i -e "s|install: install-data-am|install-no: install-data-am|" data/fonts/Makefile.am
  '';

  NIX_LDFLAGS = "-lX11 -L${libX11}/lib";

  postInstall = ''
    mkdir -p $out/share/applications
    cp ${desktopItem}/share/applications/* $out/share/applications
  '';

  meta = {
    description = "Commodore 64, 128 and other emulators";
    homepage = http://www.viceteam.org;
    license = stdenv.lib.licenses.gpl2Plus;
    maintainers = [ stdenv.lib.maintainers.sander ];
    platforms = stdenv.lib.platforms.linux;
  };
}