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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
{ lib
, stdenv
, fetchurl
, bison
, flex
, perl
, libpng
, giflib
, libjpeg
, alsa-lib
, readline
, libGLU
, libGL
, libXaw
, pkg-config
, gtk2
, SDL
, SDL_image
, autoreconfHook
, makeDesktopItem
, dos2unix
, xa
, file
}:
let
desktopItems = [
(makeDesktopItem {
name = "x128";
exec = "x128";
comment = "VICE: C128 Emulator";
desktopName = "VICE: C128 Emulator";
genericName = "Commodore 128 emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "x64";
exec = "x64";
comment = "VICE: C64 Emulator";
desktopName = "VICE: C64 Emulator";
genericName = "Commodore 64 emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "x64dtv";
exec = "x64dtv";
comment = "VICE: C64 DTV Emulator";
desktopName = "VICE: C64 DTV Emulator";
genericName = "Commodore 64 DTV emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "x64sc";
exec = "x64sc";
comment = "VICE: C64 SC Emulator";
desktopName = "VICE: C64 SC Emulator";
genericName = "Commodore 64 SC emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "xcbm2";
exec = "xcbm2";
comment = "VICE: CBM-II B-Model Emulator";
desktopName = "VICE: CBM-II B-Model Emulator";
genericName = "CBM-II B-Model Emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "xcbm5x0";
exec = "xcbm5x0";
comment = "VICE: CBM-II P-Model Emulator";
desktopName = "VICE: CBM-II P-Model Emulator";
genericName = "CBM-II P-Model Emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "xpet";
exec = "xpet";
comment = "VICE: PET Emulator";
desktopName = "VICE: PET Emulator";
genericName = "Commodore PET Emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "xplus4";
exec = "xplus4";
comment = "VICE: PLUS4 Emulator";
desktopName = "VICE: PLUS4 Emulator";
genericName = "Commodore PLUS4 Emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "xscpu64";
exec = "xscpu64";
comment = "VICE: SCPU64 Emulator";
desktopName = "VICE: SCPU64 Emulator";
genericName = "Commodore SCPU64 Emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "xvic";
exec = "xvic";
comment = "VICE: VIC-20 Emulator";
desktopName = "VICE: VIC-20 Emulator";
genericName = "Commodore VIC-20 Emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "vsid";
exec = "vsid";
comment = "VSID: The SID Emulator";
desktopName = "VSID: The SID Emulator";
genericName = "SID Emulator";
categories = [ "System" ];
})
];
in
stdenv.mkDerivation rec {
pname = "vice";
version = "3.6.1";
src = fetchurl {
url = "mirror://sourceforge/vice-emu/vice-${version}.tar.gz";
sha256 = "sha256-IN+EyFGq8vUABRCSf20xsy8mmRbTUUZcNm3Ar8ncFQw=";
};
nativeBuildInputs = [
autoreconfHook
bison
dos2unix
file
flex
pkg-config
];
buildInputs = [
alsa-lib
giflib
gtk2
libGL
libGLU
libXaw
libjpeg
libpng
perl
readline
SDL
SDL_image
xa
];
dontDisableStatic = true;
configureFlags = [ "--enable-fullscreen" "--enable-gnomeui" "--disable-pdf-docs" ];
preBuild = ''
for i in src/resid src/resid-dtv
do
mkdir -pv $i/src
ln -sv ../../wrap-u-ar.sh $i/src
done
'';
postInstall = ''
for app in ${toString desktopItems}
do
mkdir -p $out/share/applications
cp $app/share/applications/* $out/share/applications
done
'';
meta = {
description = "Emulators for a variety of 8-bit Commodore computers";
homepage = "https://vice-emu.sourceforge.io/";
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.sander ];
platforms = lib.platforms.linux;
};
}
|