vice: use GTK+-3 UI and use included desktop files

The GTK+ UI is the recommended UI by the developers. It also fixed the x128 emulator from crashing. Moreover, the GTK+ UI also includes desktop files, so we should use these instead of our own.

+15 -113
+15 -113
pkgs/applications/emulators/vice/default.nix
··· 6 , perl 7 , libpng 8 , giflib 9 - , libjpeg 10 , alsa-lib 11 , readline 12 , libGLU 13 , libGL 14 - , libXaw 15 , pkg-config 16 - , gtk2 17 , SDL 18 , SDL_image 19 - , autoreconfHook 20 - , makeDesktopItem 21 , dos2unix 22 , xa 23 , file 24 }: 25 26 - let 27 - desktopItems = [ 28 - (makeDesktopItem { 29 - name = "x128"; 30 - exec = "x128"; 31 - comment = "VICE: C128 Emulator"; 32 - desktopName = "VICE: C128 Emulator"; 33 - genericName = "Commodore 128 emulator"; 34 - categories = [ "System" ]; 35 - }) 36 - 37 - (makeDesktopItem { 38 - name = "x64dtv"; 39 - exec = "x64dtv"; 40 - comment = "VICE: C64 DTV Emulator"; 41 - desktopName = "VICE: C64 DTV Emulator"; 42 - genericName = "Commodore 64 DTV emulator"; 43 - categories = [ "System" ]; 44 - }) 45 - 46 - (makeDesktopItem { 47 - name = "x64sc"; 48 - exec = "x64sc"; 49 - comment = "VICE: C64 Emulator"; 50 - desktopName = "VICE: C64 Emulator"; 51 - genericName = "Commodore 64 SC emulator"; 52 - categories = [ "System" ]; 53 - }) 54 - 55 - (makeDesktopItem { 56 - name = "xcbm2"; 57 - exec = "xcbm2"; 58 - comment = "VICE: CBM-II B-Model Emulator"; 59 - desktopName = "VICE: CBM-II B-Model Emulator"; 60 - genericName = "CBM-II B-Model Emulator"; 61 - categories = [ "System" ]; 62 - }) 63 - 64 - (makeDesktopItem { 65 - name = "xcbm5x0"; 66 - exec = "xcbm5x0"; 67 - comment = "VICE: CBM-II P-Model Emulator"; 68 - desktopName = "VICE: CBM-II P-Model Emulator"; 69 - genericName = "CBM-II P-Model Emulator"; 70 - categories = [ "System" ]; 71 - }) 72 - 73 - (makeDesktopItem { 74 - name = "xpet"; 75 - exec = "xpet"; 76 - comment = "VICE: PET Emulator"; 77 - desktopName = "VICE: PET Emulator"; 78 - genericName = "Commodore PET Emulator"; 79 - categories = [ "System" ]; 80 - }) 81 - 82 - (makeDesktopItem { 83 - name = "xplus4"; 84 - exec = "xplus4"; 85 - comment = "VICE: PLUS4 Emulator"; 86 - desktopName = "VICE: PLUS4 Emulator"; 87 - genericName = "Commodore PLUS4 Emulator"; 88 - categories = [ "System" ]; 89 - }) 90 - 91 - (makeDesktopItem { 92 - name = "xscpu64"; 93 - exec = "xscpu64"; 94 - comment = "VICE: SCPU64 Emulator"; 95 - desktopName = "VICE: SCPU64 Emulator"; 96 - genericName = "Commodore SCPU64 Emulator"; 97 - categories = [ "System" ]; 98 - }) 99 - 100 - (makeDesktopItem { 101 - name = "xvic"; 102 - exec = "xvic"; 103 - comment = "VICE: VIC-20 Emulator"; 104 - desktopName = "VICE: VIC-20 Emulator"; 105 - genericName = "Commodore VIC-20 Emulator"; 106 - categories = [ "System" ]; 107 - }) 108 - 109 - (makeDesktopItem { 110 - name = "vsid"; 111 - exec = "vsid"; 112 - comment = "VSID: The SID Emulator"; 113 - desktopName = "VSID: The SID Emulator"; 114 - genericName = "SID Emulator"; 115 - categories = [ "System" ]; 116 - }) 117 - ]; 118 - in 119 stdenv.mkDerivation rec { 120 pname = "vice"; 121 version = "3.7.1"; ··· 126 }; 127 128 nativeBuildInputs = [ 129 - autoreconfHook 130 bison 131 dos2unix 132 file 133 flex 134 pkg-config 135 ]; 136 137 buildInputs = [ 138 alsa-lib 139 giflib 140 - gtk2 141 libGL 142 libGLU 143 - libXaw 144 - libjpeg 145 libpng 146 perl 147 readline 148 SDL 149 SDL_image 150 xa 151 ]; 152 dontDisableStatic = true; 153 - configureFlags = [ "--enable-fullscreen" "--enable-gnomeui" "--disable-pdf-docs" ]; 154 155 preBuild = '' 156 - for i in src/resid src/resid-dtv 157 - do 158 - mkdir -pv $i/src 159 - ln -sv ../../wrap-u-ar.sh $i/src 160 - done 161 ''; 162 163 postInstall = '' 164 - for app in ${toString desktopItems} 165 - do 166 - mkdir -p $out/share/applications 167 - cp $app/share/applications/* $out/share/applications 168 - done 169 ''; 170 171 meta = {
··· 6 , perl 7 , libpng 8 , giflib 9 , alsa-lib 10 , readline 11 , libGLU 12 , libGL 13 , pkg-config 14 + , gtk3 15 + , glew 16 , SDL 17 , SDL_image 18 , dos2unix 19 + , runtimeShell 20 , xa 21 , file 22 + , wrapGAppsHook 23 + , xdg-utils 24 }: 25 26 stdenv.mkDerivation rec { 27 pname = "vice"; 28 version = "3.7.1"; ··· 33 }; 34 35 nativeBuildInputs = [ 36 bison 37 dos2unix 38 file 39 flex 40 pkg-config 41 + wrapGAppsHook 42 ]; 43 44 buildInputs = [ 45 alsa-lib 46 giflib 47 + gtk3 48 + glew 49 libGL 50 libGLU 51 libpng 52 perl 53 readline 54 SDL 55 SDL_image 56 xa 57 + xdg-utils 58 ]; 59 dontDisableStatic = true; 60 + configureFlags = [ "--enable-sdl2ui" "--enable-gtk3ui" "--enable-desktop-files" "--disable-pdf-docs" "--with-gif" ]; 61 + 62 + LIBS = "-lGL"; 63 64 preBuild = '' 65 + sed -i -e 's|#!/usr/bin/env bash|${runtimeShell}/bin/bash|' src/arch/gtk3/novte/box_drawing_generate.sh 66 ''; 67 68 postInstall = '' 69 + mkdir -p $out/share/applications 70 + cp src/arch/gtk3/data/unix/vice-org-*.desktop $out/share/applications 71 ''; 72 73 meta = {