Commit | Line | Data |
---|---|---|
e5f9ec8b | 1 | ;;; GNU Guix --- Functional package management for GNU |
9af704c5 RH |
2 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
3 | ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> | |
4 | ;;; Copyright © 2015, 2016 Sou Bunnbu <iyzsong@gmail.com> | |
5 | ;;; Copyright © 2015, 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> | |
6 | ;;; Copyright © 2015, 2018 David Thompson <dthompson2@worcester.edu> | |
7 | ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> | |
e89bfc2d | 8 | ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> |
d63e0ee7 | 9 | ;;; Copyright © 2017, 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
2d4b2488 | 10 | ;;; Copyright © 2017, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
478040d4 | 11 | ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com> |
1403e1f7 | 12 | ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz> |
f6a0be2f | 13 | ;;; Copyright © 2019 David Wilson <david@daviwil.com> |
c9e7acbf | 14 | ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> |
e5f9ec8b RH |
15 | ;;; |
16 | ;;; This file is part of GNU Guix. | |
17 | ;;; | |
18 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
19 | ;;; under the terms of the GNU General Public License as published by | |
20 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
21 | ;;; your option) any later version. | |
22 | ;;; | |
23 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
24 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
25 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
26 | ;;; GNU General Public License for more details. | |
27 | ;;; | |
28 | ;;; You should have received a copy of the GNU General Public License | |
29 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
30 | ||
31 | (define-module (gnu packages emulators) | |
1403e1f7 | 32 | #:use-module (ice-9 match) |
e5f9ec8b RH |
33 | #:use-module ((guix licenses) #:prefix license:) |
34 | #:use-module (guix packages) | |
9af704c5 | 35 | #:use-module (guix download) |
e5f9ec8b | 36 | #:use-module (guix git-download) |
9af704c5 RH |
37 | #:use-module (guix svn-download) |
38 | #:use-module (gnu packages) | |
39 | #:use-module (gnu packages algebra) | |
4c40ed9d | 40 | #:use-module (gnu packages assembly) |
e5f9ec8b | 41 | #:use-module (gnu packages audio) |
9af704c5 RH |
42 | #:use-module (gnu packages autotools) |
43 | #:use-module (gnu packages base) | |
44 | #:use-module (gnu packages boost) | |
45 | #:use-module (gnu packages backup) | |
1403e1f7 | 46 | #:use-module (gnu packages cdrom) |
e5f9ec8b RH |
47 | #:use-module (gnu packages compression) |
48 | #:use-module (gnu packages curl) | |
e8ffa382 | 49 | #:use-module (gnu packages elf) |
e5f9ec8b RH |
50 | #:use-module (gnu packages fonts) |
51 | #:use-module (gnu packages fontutils) | |
9af704c5 | 52 | #:use-module (gnu packages freedesktop) |
e5f9ec8b | 53 | #:use-module (gnu packages game-development) |
cbf58afa | 54 | #:use-module (gnu packages gcc) |
e5f9ec8b RH |
55 | #:use-module (gnu packages gettext) |
56 | #:use-module (gnu packages gl) | |
57 | #:use-module (gnu packages glib) | |
58 | #:use-module (gnu packages gtk) | |
59 | #:use-module (gnu packages image) | |
9af704c5 RH |
60 | #:use-module (gnu packages imagemagick) |
61 | #:use-module (gnu packages libedit) | |
e5f9ec8b RH |
62 | #:use-module (gnu packages libusb) |
63 | #:use-module (gnu packages linux) | |
c8b2fd28 NG |
64 | #:use-module (gnu packages lua) |
65 | #:use-module (gnu packages maths) | |
4c40ed9d | 66 | #:use-module (gnu packages mp3) |
c8b2fd28 | 67 | #:use-module (gnu packages music) |
9af704c5 | 68 | #:use-module (gnu packages ncurses) |
c8b2fd28 | 69 | #:use-module (gnu packages networking) |
e5f9ec8b RH |
70 | #:use-module (gnu packages pkg-config) |
71 | #:use-module (gnu packages pulseaudio) | |
9af704c5 | 72 | #:use-module (gnu packages python) |
e5f9ec8b RH |
73 | #:use-module (gnu packages qt) |
74 | #:use-module (gnu packages sdl) | |
9d0c291e | 75 | #:use-module (gnu packages sphinx) |
cd0322a3 | 76 | #:use-module (gnu packages sqlite) |
c8b2fd28 NG |
77 | #:use-module (gnu packages texinfo) |
78 | #:use-module (gnu packages textutils) | |
e5f9ec8b RH |
79 | #:use-module (gnu packages tls) |
80 | #:use-module (gnu packages upnp) | |
81 | #:use-module (gnu packages video) | |
9af704c5 | 82 | #:use-module (gnu packages vulkan) |
e5f9ec8b | 83 | #:use-module (gnu packages wxwidgets) |
9af704c5 | 84 | #:use-module (gnu packages xdisorg) |
e5f9ec8b | 85 | #:use-module (gnu packages xiph) |
9af704c5 | 86 | #:use-module (gnu packages xml) |
e5f9ec8b | 87 | #:use-module (gnu packages xorg) |
c8b2fd28 | 88 | #:use-module (gnu packages web) |
9af704c5 | 89 | #:use-module (guix build-system cmake) |
f6a0be2f | 90 | #:use-module (guix build-system glib-or-gtk) |
9af704c5 RH |
91 | #:use-module (guix build-system gnu)) |
92 | ||
93 | (define-public desmume | |
94 | (package | |
95 | (name "desmume") | |
96 | (version "0.9.11") | |
97 | (source | |
98 | (origin | |
99 | (method url-fetch) | |
100 | (uri (string-append | |
101 | "mirror://sourceforge/desmume/desmume/" | |
102 | version "/desmume-" version ".tar.gz")) | |
103 | (sha256 | |
104 | (base32 | |
105 | "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs")))) | |
106 | (build-system gnu-build-system) | |
107 | (arguments | |
108 | ;; Enable support for WiFi and microphone. | |
109 | `(#:configure-flags '("--enable-wifi" | |
110 | "--enable-openal"))) | |
111 | (native-inputs | |
112 | `(("pkg-config" ,pkg-config) | |
113 | ("intltool" ,intltool))) | |
114 | (inputs | |
115 | `(("zlib" ,zlib) | |
116 | ("sdl" ,sdl) | |
117 | ("glib" ,glib) | |
118 | ("gtk+" ,gtk+-2) | |
119 | ("glu" ,glu))) | |
120 | (home-page "http://desmume.org/") | |
121 | (synopsis "Nintendo DS emulator") | |
122 | (description | |
123 | "DeSmuME is an emulator for the Nintendo DS handheld gaming console.") | |
124 | (license license:gpl2))) | |
e5f9ec8b RH |
125 | |
126 | ;; Building from recent Git because the official 5.0 release no longer builds. | |
127 | (define-public dolphin-emu | |
2b332c51 RH |
128 | (let ((commit "a9745400ec5cea7e55d94955afbdc44d1a4982d1") |
129 | (revision "7")) | |
e5f9ec8b RH |
130 | (package |
131 | (name "dolphin-emu") | |
132 | (version (git-version "5.0" revision commit)) | |
133 | (source | |
134 | (origin | |
135 | (method git-fetch) | |
136 | (uri (git-reference | |
137 | (url "https://github.com/dolphin-emu/dolphin.git") | |
138 | (commit commit))) | |
139 | (file-name (git-file-name name version)) | |
85280804 EF |
140 | (modules '((guix build utils))) |
141 | (snippet | |
142 | '(begin | |
143 | ;; Remove external stuff we don't need. | |
144 | (for-each (lambda (dir) | |
145 | (delete-file-recursively | |
146 | (string-append "Externals/" dir))) | |
fab8d41c | 147 | '("LZO" "OpenAL" "Qt" "SFML" "curl" "ffmpeg" |
85280804 | 148 | "gettext" "hidapi" "libpng" "libusb" "mbedtls" |
2b332c51 | 149 | "miniupnpc" "MoltenVK" "zlib")) |
85280804 EF |
150 | ;; Clean up source. |
151 | (for-each delete-file (find-files "." ".*\\.(bin|dsy|exe|jar|rar)$")) | |
152 | #t)) | |
e5f9ec8b RH |
153 | (sha256 |
154 | (base32 | |
2b332c51 | 155 | "0ic08ii4vlqlmk2wkfc99jiy6nji2wfq56r7slj23wgvhznnaabk")))) |
e5f9ec8b RH |
156 | (build-system cmake-build-system) |
157 | (arguments | |
158 | '(#:tests? #f | |
e5f9ec8b RH |
159 | #:phases |
160 | (modify-phases %standard-phases | |
6bebad77 | 161 | (add-before 'configure 'generate-fonts&hardcore-libvulkan-path |
e5f9ec8b RH |
162 | (lambda* (#:key inputs outputs #:allow-other-keys) |
163 | (let ((fontfile | |
164 | (string-append (assoc-ref inputs "font-wqy-microhei") | |
6bebad77 RH |
165 | "/share/fonts/truetype/wqy-microhei.ttc")) |
166 | (libvulkan | |
e6fcf903 | 167 | (string-append (assoc-ref inputs "vulkan-loader") |
6bebad77 | 168 | "/lib/libvulkan.so"))) |
e5f9ec8b | 169 | (chdir "docs") |
0fe041bd | 170 | (invoke "bash" "-c" "g++ -O2 $(freetype-config \ |
e5f9ec8b RH |
171 | --cflags --libs) gc-font-tool.cpp -o gc-font-tool") |
172 | (invoke "./gc-font-tool" "a" fontfile "font_western.bin") | |
173 | (invoke "./gc-font-tool" "s" fontfile "font_japanese.bin") | |
174 | (copy-file "font_japanese.bin" "../Data/Sys/GC/font_japanese.bin") | |
175 | (copy-file "font_western.bin" "../Data/Sys/GC/font_western.bin") | |
176 | (chdir "..") | |
6bebad77 | 177 | (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp" |
2b332c51 RH |
178 | (("\"vulkan\", 1") (string-append "\"vulkan\""))) |
179 | (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp" | |
180 | (("\"vulkan\"") (string-append "\"" libvulkan "\""))) | |
181 | (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp" | |
182 | (("Common::DynamicLibrary::GetVersionedFilename") "")) | |
e5f9ec8b RH |
183 | #t)))) |
184 | ||
fab8d41c RH |
185 | ;; The FindGTK2 cmake script only checks hardcoded directories for |
186 | ;; glib/gtk headers. | |
187 | ||
e5f9ec8b | 188 | #:configure-flags |
fab8d41c | 189 | (list (string-append "-DX11_INCLUDE_DIR=" |
e5f9ec8b RH |
190 | (assoc-ref %build-inputs "libx11") |
191 | "/include") | |
192 | (string-append "-DX11_LIBRARIES=" | |
193 | (assoc-ref %build-inputs "libx11") | |
194 | "/lib/libX11.so") | |
195 | "-DX11_FOUND=1"))) | |
e5f9ec8b RH |
196 | (native-inputs |
197 | `(("pkg-config" ,pkg-config) | |
198 | ("gettext" ,gnu-gettext))) | |
199 | (inputs | |
200 | `(("alsa-lib" ,alsa-lib) | |
201 | ("ao" ,ao) | |
202 | ("bluez" ,bluez) | |
203 | ("curl" ,curl) | |
204 | ("eudev" ,eudev) | |
e7039f10 | 205 | ("ffmpeg" ,ffmpeg) |
e5f9ec8b RH |
206 | ("font-wqy-microhei" ,font-wqy-microhei) |
207 | ("freetype" ,freetype) | |
208 | ("glew" ,glew) | |
209 | ("glib" ,glib) | |
210 | ("glu" ,glu) | |
211 | ("gtk+" ,gtk+-2) | |
212 | ("hidapi" ,hidapi) | |
213 | ("libevdev" ,libevdev) | |
214 | ("libpng" ,libpng) | |
215 | ("libusb" ,libusb) | |
216 | ("libx11" ,libx11) | |
217 | ("libxi" ,libxi) | |
218 | ("libxrandr" ,libxrandr) | |
219 | ("lzo" ,lzo) | |
220 | ("mbedtls-apache" ,mbedtls-apache) | |
221 | ("mesa" ,mesa) | |
222 | ("miniupnpc" ,miniupnpc) | |
223 | ("openal" ,openal) | |
fab8d41c | 224 | ("pugixml" ,pugixml) |
e5f9ec8b RH |
225 | ("pulseaudio" ,pulseaudio) |
226 | ("qtbase" ,qtbase) | |
227 | ("sdl2" ,sdl2) | |
228 | ("sfml" ,sfml) | |
229 | ("soil" ,soil) | |
230 | ("soundtouch" ,soundtouch) | |
e6fcf903 | 231 | ("vulkan-loader" ,vulkan-loader) |
e5f9ec8b RH |
232 | ("zlib" ,zlib))) |
233 | (home-page "https://dolphin-emu.org/") | |
234 | (synopsis "Nintendo Wii and GameCube emulator") | |
235 | (description | |
236 | "Dolphin is an emulator for two Nintendo video game consoles: the | |
237 | GameCube and the Wii. It provides compatibility with all PC controllers, | |
238 | turbo speed, networked multiplayer, and graphical enhancements.") | |
e89bfc2d | 239 | (supported-systems '("x86_64-linux" "aarch64-linux")) |
e5f9ec8b RH |
240 | ; dolphin/Data/Sys/GC/font_*.bin: Licensed under ASL2.0. |
241 | (license (list license:gpl2+ license:asl2.0 license:fdl1.2+))))) | |
9af704c5 RH |
242 | |
243 | (define-public dosbox | |
244 | (package | |
245 | (name "dosbox") | |
b09e4960 | 246 | (version "0.74-3") |
9af704c5 | 247 | (source (origin |
478040d4 RH |
248 | (method url-fetch) |
249 | (uri (string-append "https://sourceforge.net/projects/dosbox" | |
250 | "/files/dosbox/" version "/dosbox-" | |
251 | version ".tar.gz/download")) | |
252 | (file-name (string-append name "-" version ".tar.gz")) | |
9af704c5 RH |
253 | (sha256 |
254 | (base32 | |
b09e4960 | 255 | "02i648i50dwicv1vaql15rccv4g8h5blf5g6inv67lrfxpbkvlf0")))) |
9af704c5 | 256 | (build-system gnu-build-system) |
9af704c5 RH |
257 | (native-inputs |
258 | `(("autoconf" ,autoconf) | |
259 | ("automake" ,automake))) | |
260 | (inputs | |
261 | `(("sdl" ,sdl) | |
262 | ("libpng" ,libpng) | |
263 | ("zlib" ,zlib) | |
264 | ("alsa-lib" ,alsa-lib) | |
265 | ("glu" ,glu) | |
266 | ("mesa" ,mesa))) | |
267 | (home-page "http://www.dosbox.com") | |
268 | (synopsis "X86 emulator with CGA/EGA/VGA/etc. graphics and sound") | |
269 | (description "DOSBox is a DOS-emulator that uses the SDL library. DOSBox | |
270 | also emulates CPU:286/386 realmode/protected mode, Directory | |
271 | FileSystem/XMS/EMS, Tandy/Hercules/CGA/EGA/VGA/VESA graphics, a | |
272 | SoundBlaster/Gravis Ultra Sound card for excellent sound compatibility with | |
273 | older games.") | |
274 | (license license:gpl2+))) | |
275 | ||
276 | (define-public emulation-station | |
4530fe8e JK |
277 | ;; No release for a long time, new commits fix build issues |
278 | (let ((commit "9cc42adff67946175d2b7e25c6ae69cc374e98a0") | |
279 | (revision "1")) | |
9af704c5 RH |
280 | (package |
281 | (name "emulation-station") | |
4530fe8e | 282 | (version (git-version "2.0.1" revision commit)) |
9af704c5 RH |
283 | (source (origin |
284 | (method git-fetch) ; no tarball available | |
285 | (uri (git-reference | |
286 | (url "https://github.com/Aloshi/EmulationStation.git") | |
287 | (commit commit))) ; no version tag | |
4530fe8e | 288 | (file-name (git-file-name name version)) |
9af704c5 RH |
289 | (sha256 |
290 | (base32 | |
4530fe8e | 291 | "1cva0ns650v17lfn8in095zci6lc43d23f1x3mlzc41qfqa6mbd1")))) |
9af704c5 RH |
292 | (build-system cmake-build-system) |
293 | (arguments | |
294 | '(#:tests? #f)) ; no tests | |
295 | (inputs | |
296 | `(("alsa-lib" ,alsa-lib) | |
297 | ("boost" ,boost) | |
298 | ("curl" ,curl) | |
299 | ("eigin" ,eigen) | |
300 | ("freeimage" ,freeimage) | |
301 | ("freetype" ,freetype) | |
302 | ("mesa" ,mesa) | |
303 | ("sdl2" ,sdl2))) | |
304 | (synopsis "Video game console emulator front-end") | |
305 | (description "EmulationStation provides a graphical front-end to a large | |
306 | number of video game console emulators. It features an interface that is | |
307 | usable with any game controller that has at least 4 buttons, theming support, | |
308 | and a game metadata scraper.") | |
309 | (home-page "http://www.emulationstation.org") | |
310 | (license license:expat)))) | |
311 | ||
c66f3b3b JK |
312 | ;; Note: higan v107 has been released, but as explained by the dialog that |
313 | ;; appears after starting the new version, it's an experimental release. The | |
314 | ;; author recommends v106 for general use. | |
315 | ;; | |
316 | ;; When updating to v107 (or probably beyond), sdl will have to be replaced | |
317 | ;; with sdl2, and libxrandr will need to be added to inputs. The patch | |
318 | ;; `higan-remove-march-native-flag.patch' will not be necessary, since the flag | |
319 | ;; is now being added only for `platform=local', which is not the default. | |
9af704c5 RH |
320 | (define-public higan |
321 | (package | |
322 | (name "higan") | |
323 | (version "106") | |
324 | (source | |
325 | (origin | |
f3686999 JK |
326 | (method git-fetch) |
327 | (uri (git-reference | |
328 | (url "https://github.com/byuu/higan/") | |
329 | (commit (string-append "v" version)))) | |
330 | (file-name (git-file-name name version)) | |
9af704c5 | 331 | (sha256 |
f3686999 | 332 | (base32 "1mxivf8124vz4hl0b0xa1yqv0z9m3i12v9psmbpqkprrbq0wbgn1")) |
9af704c5 RH |
333 | (patches (search-patches "higan-remove-march-native-flag.patch")))) |
334 | (build-system gnu-build-system) | |
335 | (native-inputs | |
336 | `(("pkg-config" ,pkg-config))) | |
337 | (inputs | |
338 | `(("alsa-lib" ,alsa-lib) | |
339 | ("ao" ,ao) | |
340 | ("eudev" ,eudev) | |
341 | ("gtk+" ,gtk+-2) | |
342 | ("gtksourceview-2" ,gtksourceview-2) | |
343 | ("libxv" ,libxv) | |
344 | ("mesa" ,mesa) | |
345 | ("openal" ,openal) | |
346 | ("pulseaudio" ,pulseaudio) | |
347 | ("sdl" ,sdl))) | |
348 | (arguments | |
349 | '(#:phases | |
350 | (let ((build-phase (assoc-ref %standard-phases 'build)) | |
351 | (install-phase (assoc-ref %standard-phases 'install))) | |
352 | (modify-phases %standard-phases | |
353 | ;; The higan build system has no configure phase. | |
354 | (delete 'configure) | |
355 | (add-before 'build 'chdir-to-higan | |
356 | (lambda _ | |
6d34d3f8 JK |
357 | (chdir "higan") |
358 | #t)) | |
9af704c5 RH |
359 | (add-before 'install 'create-/share/applications |
360 | (lambda* (#:key outputs #:allow-other-keys) | |
361 | (let ((out (assoc-ref outputs "out"))) | |
362 | ;; It seems the author forgot to do this in the Makefile. | |
6d34d3f8 JK |
363 | (mkdir-p (string-append out "/share/applications")) |
364 | #t))) | |
9af704c5 RH |
365 | (add-after 'install 'chdir-to-icarus |
366 | (lambda _ | |
6d34d3f8 JK |
367 | (chdir "../icarus") |
368 | #t)) | |
9af704c5 RH |
369 | (add-after 'chdir-to-icarus 'build-icarus build-phase) |
370 | (add-after 'build-icarus 'install-icarus install-phase) | |
371 | (add-after 'install-icarus 'wrap-higan-executable | |
372 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
373 | (let* ((out (assoc-ref outputs "out")) | |
374 | (bin (string-append out "/bin")) | |
375 | (higan (string-append bin "/higan")) | |
376 | (higan-original (string-append higan "-original")) | |
377 | (bash (string-append (assoc-ref inputs "bash") | |
378 | "/bin/bash")) | |
379 | (coreutils (assoc-ref inputs "coreutils")) | |
380 | (mkdir (string-append coreutils "/bin/mkdir")) | |
381 | (cp (string-append coreutils "/bin/cp")) | |
382 | (cp-r (string-append cp " -r --no-preserve=mode"))) | |
383 | ;; First, have the executable make sure ~/.local/share/higan | |
384 | ;; contains up to date files. Higan insists on looking there | |
385 | ;; for these data files. | |
386 | (rename-file higan higan-original) | |
387 | (with-output-to-file higan | |
388 | (lambda () | |
389 | (display | |
390 | (string-append | |
391 | "#!" bash "\n" | |
392 | ;; higan doesn't respect $XDG_DATA_HOME | |
393 | mkdir " -p ~/.local/share\n" | |
394 | cp-r " " out "/share/higan ~/.local/share\n" | |
395 | "exec " higan-original)))) | |
396 | (chmod higan #o555) | |
397 | ;; Second, make sure higan will find icarus in PATH. | |
398 | (wrap-program higan | |
6d34d3f8 JK |
399 | `("PATH" ":" prefix (,bin))) |
400 | #t))))) | |
9af704c5 RH |
401 | #:make-flags |
402 | (list "compiler=g++" | |
403 | (string-append "prefix=" (assoc-ref %outputs "out"))) | |
404 | ;; There is no test suite. | |
405 | #:tests? #f)) | |
406 | (home-page "http://byuu.org/emulation/higan/") | |
407 | (synopsis "Nintendo multi-system emulator") | |
408 | (description | |
409 | "higan (formerly bsnes) is an emulator for multiple Nintendo video game | |
410 | consoles, including the Nintendo Entertainment System (NES/Famicom), Super | |
411 | Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy | |
412 | Color (GBC), and Game Boy Advance (GBA). It also supports the subsystems | |
413 | Super Game Boy, BS-X Satellaview, and Sufami Turbo.") | |
414 | ;; As noted in these files among more: | |
415 | ;; - icarus/icarus.cpp | |
416 | ;; - higan/emulator/emulator.hpp | |
417 | (license license:gpl3))) | |
418 | ||
419 | (define-public mgba | |
420 | (package | |
421 | (name "mgba") | |
d63e0ee7 NG |
422 | (version "0.8.0") |
423 | (source | |
424 | (origin | |
425 | (method git-fetch) | |
426 | (uri (git-reference | |
427 | (url "https://github.com/mgba-emu/mgba.git") | |
428 | (commit version))) | |
429 | (file-name (git-file-name name version)) | |
430 | (sha256 | |
431 | (base32 "0m3rgcdv32ms98j7rrmk2hphvn462bwsd6xfz2ssy05398pj4ljh")) | |
432 | (modules '((guix build utils))) | |
433 | (snippet | |
434 | ;; Make sure we don't use the bundled software. | |
435 | '(begin | |
436 | (for-each | |
437 | (lambda (subdir) | |
438 | (let ((lib-subdir (string-append "src/third-party/" subdir))) | |
439 | (delete-file-recursively lib-subdir))) | |
440 | '("libpng" "lzma" "sqlite3" "zlib")) | |
441 | #t)))) | |
9af704c5 RH |
442 | (build-system cmake-build-system) |
443 | (arguments | |
444 | `(#:tests? #f ;no "test" target | |
445 | #:configure-flags | |
446 | (list "-DUSE_LZMA=OFF" ;do not use bundled LZMA | |
6ea1c6fc | 447 | "-DUSE_LIBZIP=OFF"))) ;use "zlib" instead |
9af704c5 RH |
448 | (native-inputs `(("pkg-config" ,pkg-config))) |
449 | (inputs `(("ffmpeg" ,ffmpeg) | |
450 | ("imagemagick" ,imagemagick) | |
451 | ("libedit" ,libedit) | |
6dcac920 | 452 | ("libelf" ,libelf) |
9af704c5 RH |
453 | ("libepoxy" ,libepoxy) |
454 | ("libpng" ,libpng) | |
455 | ("mesa" ,mesa) | |
456 | ("minizip" ,minizip) | |
457 | ("ncurses" ,ncurses) | |
458 | ("qtbase" ,qtbase) | |
459 | ("qtmultimedia" ,qtmultimedia) | |
460 | ("qttools" ,qttools) | |
461 | ("sdl2" ,sdl2) | |
462 | ("sqlite" ,sqlite) | |
463 | ("zlib" ,zlib))) | |
464 | (home-page "https://mgba.io") | |
465 | (synopsis "Game Boy Advance emulator") | |
466 | (description | |
467 | "mGBA is an emulator for running Game Boy Advance games. It aims to be | |
468 | faster and more accurate than many existing Game Boy Advance emulators, as | |
469 | well as adding features that other emulators lack. It also supports Game Boy | |
470 | and Game Boy Color games.") | |
471 | ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+ and "inih.c" is | |
472 | ;; BSD-3. | |
473 | (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3)))) | |
474 | ||
c9e7acbf JK |
475 | (define-public sameboy |
476 | (package | |
477 | (name "sameboy") | |
478 | (version "0.12.3") | |
479 | (source | |
480 | (origin | |
481 | (method git-fetch) | |
482 | (uri (git-reference | |
483 | (url "https://github.com/LIJI32/SameBoy.git") | |
484 | (commit (string-append "v" version)))) | |
485 | (file-name (git-file-name name version)) | |
486 | (sha256 | |
487 | (base32 "0m5rv2x8qck1kr43xq186pp4kaiay7gd1x775n9qrljcd7z4x6fs")))) | |
488 | (build-system gnu-build-system) | |
489 | (native-inputs | |
490 | `(("rgbds" ,rgbds) | |
491 | ("gcc" ,gcc-9) | |
492 | ("pkg-config" ,pkg-config))) | |
493 | (inputs | |
494 | `(("sdl2" ,sdl2))) | |
495 | (arguments | |
496 | `(#:tests? #f ; There are no tests | |
497 | #:make-flags `("CC=gcc" "CONF=release" | |
498 | ,(string-append "DATA_DIR=" | |
499 | (assoc-ref %outputs "out") | |
500 | "/share/sameboy/")) | |
501 | #:phases | |
502 | (modify-phases %standard-phases | |
503 | (delete 'configure) | |
504 | (replace 'install | |
505 | (lambda* (#:key outputs #:allow-other-keys) | |
506 | (let* ((out (assoc-ref outputs "out")) | |
507 | (bin (string-append out "/bin")) | |
508 | (data (string-append out "/share/sameboy/"))) | |
509 | (with-directory-excursion "build/bin/SDL" | |
510 | (install-file "sameboy" bin) | |
511 | (delete-file "sameboy") | |
512 | (copy-recursively "." data)))))))) | |
513 | (home-page "https://sameboy.github.io/") | |
514 | (synopsis "Accurate Game Boy, Game Boy Color and Super Game Boy emulator") | |
515 | (description "SameBoy is a user friendly Game Boy, Game Boy Color | |
516 | and Super Game Boy emulator. SameBoy is accurate and includes a wide | |
517 | range of debugging features. It has all the features one would expect | |
518 | from an emulator---from save states to scaling filters.") | |
519 | (license license:expat))) | |
520 | ||
9af704c5 RH |
521 | (define-public mupen64plus-core |
522 | (package | |
523 | (name "mupen64plus-core") | |
524 | (version "2.5") | |
525 | (source | |
526 | (origin | |
10bcd4bb TGR |
527 | (method git-fetch) |
528 | (uri (git-reference | |
529 | (url "https://github.com/mupen64plus/mupen64plus-core.git") | |
530 | (commit version))) | |
531 | (file-name (git-file-name name version)) | |
9af704c5 | 532 | (sha256 |
10bcd4bb | 533 | (base32 "116fndl6652zrp1r6ag4xv3dzp1x52mlvadj8xwflq07fd5rhri1")))) |
9af704c5 RH |
534 | (build-system gnu-build-system) |
535 | (native-inputs | |
536 | `(("pkg-config" ,pkg-config) | |
537 | ("which" ,which))) | |
538 | (inputs | |
539 | `(("freetype" ,freetype) | |
540 | ("glu" ,glu) | |
541 | ("libpng" ,libpng) | |
542 | ("mesa" ,mesa) | |
543 | ("sdl2" ,sdl2) | |
544 | ("zlib" ,zlib))) | |
545 | (arguments | |
546 | '(#:phases | |
547 | (modify-phases %standard-phases | |
548 | ;; The mupen64plus build system has no configure phase. | |
549 | (delete 'configure) | |
550 | ;; Makefile is in a subdirectory. | |
551 | (add-before | |
eaa2b35c | 552 | 'build 'chdir-to-project-directory |
9af704c5 | 553 | (lambda _ |
eaa2b35c TGR |
554 | (chdir "projects/unix") |
555 | #t))) | |
9af704c5 RH |
556 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
557 | (list "all" (string-append "PREFIX=" out))) | |
558 | ;; There are no tests. | |
559 | #:tests? #f)) | |
560 | ;; As per the Makefile (in projects/unix/Makefile): | |
561 | (supported-systems '("i686-linux" "x86_64-linux")) | |
eaa2b35c | 562 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
563 | (synopsis "Nintendo 64 emulator core library") |
564 | (description | |
565 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
566 | which is capable of accurately playing many games. This package contains the | |
567 | core library.") | |
568 | (license license:gpl2+))) | |
569 | ||
570 | (define-public mupen64plus-audio-sdl | |
571 | (package | |
572 | (name "mupen64plus-audio-sdl") | |
573 | (version "2.5") | |
574 | (source | |
575 | (origin | |
8c6d45cb TGR |
576 | (method git-fetch) |
577 | (uri (git-reference | |
578 | (url "https://github.com/mupen64plus/mupen64plus-audio-sdl.git") | |
579 | (commit version))) | |
580 | (file-name (git-file-name name version)) | |
9af704c5 | 581 | (sha256 |
8c6d45cb | 582 | (base32 "0z19amfg9vr2pqjjri1ipc7hs681fzjcnb0f9y7bjhp5n8d7p6bb")))) |
9af704c5 RH |
583 | (build-system gnu-build-system) |
584 | (native-inputs | |
585 | `(("pkg-config" ,pkg-config) | |
586 | ("which" ,which))) | |
587 | (inputs | |
588 | `(("mupen64plus-core" ,mupen64plus-core) | |
589 | ("sdl2" ,sdl2))) | |
590 | (arguments | |
591 | '(#:phases | |
592 | (modify-phases %standard-phases | |
593 | ;; The mupen64plus build system has no configure phase. | |
594 | (delete 'configure) | |
595 | ;; Makefile is in a subdirectory. | |
596 | (add-before | |
597 | 'build 'cd-to-project-dir | |
598 | (lambda _ | |
599 | (chdir "projects/unix")))) | |
600 | #:make-flags | |
601 | (let ((out (assoc-ref %outputs "out")) | |
602 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
603 | (list "all" | |
604 | (string-append "PREFIX=" out) | |
605 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
606 | ;; There are no tests. | |
607 | #:tests? #f)) | |
cf5e9465 | 608 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
609 | (synopsis "Mupen64Plus SDL input plugin") |
610 | (description | |
611 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
612 | which is capable of accurately playing many games. This package contains the | |
613 | SDL audio plugin.") | |
614 | (license license:gpl2+))) | |
615 | ||
616 | (define-public mupen64plus-input-sdl | |
617 | (package | |
618 | (name "mupen64plus-input-sdl") | |
619 | (version "2.5") | |
620 | (source | |
621 | (origin | |
ef5ef8f5 TGR |
622 | (method git-fetch) |
623 | (uri (git-reference | |
624 | (url "https://github.com/mupen64plus/mupen64plus-input-sdl.git") | |
625 | (commit version))) | |
626 | (file-name (git-file-name name version)) | |
9af704c5 | 627 | (sha256 |
ef5ef8f5 | 628 | (base32 "1dyazfbdjycdfslq8jixqiqhziw0rlkvach2r9dz91229jmkyc9c")))) |
9af704c5 RH |
629 | (build-system gnu-build-system) |
630 | (native-inputs | |
631 | `(("which" ,which))) | |
632 | (inputs | |
633 | `(("mupen64plus-core" ,mupen64plus-core) | |
634 | ("sdl2" ,sdl2))) | |
635 | (arguments | |
636 | '(#:phases | |
637 | (modify-phases %standard-phases | |
638 | ;; The mupen64plus build system has no configure phase. | |
639 | (delete 'configure) | |
640 | ;; Makefile is in a subdirectory. | |
641 | (add-before | |
642 | 'build 'cd-to-project-dir | |
643 | (lambda _ | |
644 | (chdir "projects/unix")))) | |
645 | #:make-flags | |
646 | (let ((out (assoc-ref %outputs "out")) | |
647 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
648 | (list "all" | |
649 | (string-append "PREFIX=" out) | |
650 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
651 | ;; There are no tests. | |
652 | #:tests? #f)) | |
d738ce16 | 653 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
654 | (synopsis "Mupen64Plus SDL input plugin") |
655 | (description | |
656 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
657 | which is capable of accurately playing many games. This package contains the | |
658 | SDL input plugin.") | |
659 | (license license:gpl2+))) | |
660 | ||
661 | (define-public mupen64plus-rsp-hle | |
662 | (package | |
663 | (name "mupen64plus-rsp-hle") | |
664 | (version "2.5") | |
665 | (source | |
666 | (origin | |
c4f0c8ba TGR |
667 | (method git-fetch) |
668 | (uri (git-reference | |
669 | (url "https://github.com/mupen64plus/mupen64plus-rsp-hle.git") | |
670 | (commit version))) | |
671 | (file-name (git-file-name name version)) | |
9af704c5 | 672 | (sha256 |
c4f0c8ba | 673 | (base32 "0pi31qzjjp7aypdvvnz6ms18g09c4gqzxi6328zj8sji94b75gf0")))) |
9af704c5 RH |
674 | (build-system gnu-build-system) |
675 | (inputs | |
676 | `(("mupen64plus-core" ,mupen64plus-core))) | |
677 | (arguments | |
678 | '(#:phases | |
679 | (modify-phases %standard-phases | |
680 | ;; The mupen64plus build system has no configure phase. | |
681 | (delete 'configure) | |
682 | ;; Makefile is in a subdirectory. | |
683 | (add-before | |
684 | 'build 'cd-to-project-dir | |
685 | (lambda _ | |
686 | (chdir "projects/unix")))) | |
687 | #:make-flags | |
688 | (let ((out (assoc-ref %outputs "out")) | |
689 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
690 | (list "all" | |
691 | (string-append "PREFIX=" out) | |
692 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
693 | ;; There are no tests. | |
694 | #:tests? #f)) | |
cf396ea5 | 695 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
696 | (synopsis "Mupen64Plus SDL input plugin") |
697 | (description | |
698 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
699 | which is capable of accurately playing many games. This package contains the | |
700 | high-level emulation (HLE) RSP processor plugin.") | |
701 | (license license:gpl2+))) | |
702 | ||
703 | (define-public mupen64plus-rsp-z64 | |
704 | (package | |
705 | (name "mupen64plus-rsp-z64") | |
706 | (version "2.0.0") | |
707 | (source | |
708 | (origin | |
052650c8 TGR |
709 | (method git-fetch) |
710 | (uri (git-reference | |
711 | (url "https://github.com/mupen64plus/mupen64plus-rsp-z64.git") | |
712 | (commit version))) | |
713 | (file-name (git-file-name name version)) | |
9af704c5 | 714 | (sha256 |
052650c8 | 715 | (base32 "0nfyjns9k8xbg3aqs7593nfaxvlj72h3l8h467442xlk8ajfcylx")))) |
9af704c5 RH |
716 | (build-system gnu-build-system) |
717 | (inputs | |
718 | `(("mupen64plus-core" ,mupen64plus-core))) | |
719 | (arguments | |
720 | '(#:phases | |
721 | (modify-phases %standard-phases | |
722 | ;; The mupen64plus build system has no configure phase. | |
723 | (delete 'configure) | |
724 | ;; Makefile is in a subdirectory. | |
725 | (add-before | |
726 | 'build 'cd-to-project-dir | |
727 | (lambda _ | |
728 | (chdir "projects/unix")))) | |
729 | #:make-flags | |
730 | (let ((out (assoc-ref %outputs "out")) | |
731 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
732 | (list "all" | |
733 | (string-append "PREFIX=" out) | |
734 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
735 | ;; There are no tests. | |
736 | #:tests? #f)) | |
24b03073 | 737 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
738 | (synopsis "Mupen64Plus SDL input plugin") |
739 | (description | |
740 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
741 | which is capable of accurately playing many games. This package contains the | |
742 | Z64 RSP processor plugin.") | |
743 | (license license:gpl2+))) | |
744 | ||
745 | (define-public mupen64plus-video-arachnoid | |
746 | (package | |
747 | (name "mupen64plus-video-arachnoid") | |
748 | (version "2.0.0") | |
749 | (source | |
750 | (origin | |
2074c8bf TGR |
751 | (method git-fetch) |
752 | (uri (git-reference | |
753 | (url "https://github.com/mupen64plus/mupen64plus-video-arachnoid.git") | |
754 | (commit version))) | |
755 | (file-name (git-file-name name version)) | |
9af704c5 | 756 | (sha256 |
2074c8bf | 757 | (base32 "1v9fqwpb6pawr8z5cm2ki7bqkks4iyr5c4jy4v5khj6h8zcv55gc")))) |
9af704c5 RH |
758 | (build-system gnu-build-system) |
759 | (native-inputs | |
760 | `(("pkg-config" ,pkg-config) | |
761 | ("which" ,which))) | |
762 | (inputs | |
763 | `(("mesa" ,mesa) | |
764 | ("mupen64plus-core" ,mupen64plus-core))) | |
765 | (arguments | |
766 | '(#:phases | |
767 | (modify-phases %standard-phases | |
768 | ;; The mupen64plus build system has no configure phase. | |
769 | (delete 'configure) | |
770 | ;; Makefile is in a subdirectory. | |
771 | (add-before | |
772 | 'build 'cd-to-project-dir | |
773 | (lambda _ | |
774 | (chdir "projects/unix")))) | |
775 | #:make-flags | |
776 | (let ((out (assoc-ref %outputs "out")) | |
777 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
778 | (list "all" | |
779 | (string-append "PREFIX=" out) | |
780 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
781 | ;; There are no tests. | |
782 | #:tests? #f)) | |
5daa2019 | 783 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
784 | (synopsis "Mupen64Plus Rice Video plugin") |
785 | (description | |
786 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
787 | which is capable of accurately playing many games. This package contains the | |
788 | Arachnoid video plugin.") | |
789 | (license license:gpl2+))) | |
790 | ||
791 | (define-public mupen64plus-video-glide64 | |
792 | (package | |
793 | (name "mupen64plus-video-glide64") | |
794 | (version "2.0.0") | |
795 | (source | |
796 | (origin | |
62536186 TGR |
797 | (method git-fetch) |
798 | (uri (git-reference | |
799 | (url "https://github.com/mupen64plus/mupen64plus-video-glide64.git") | |
800 | (commit version))) | |
801 | (file-name (git-file-name name version)) | |
9af704c5 | 802 | (sha256 |
62536186 | 803 | (base32 "0qn5za7g7796kh2ag3xpmhbqg0yf71g9liz6ks0rha8pz73lgs01")))) |
9af704c5 RH |
804 | (build-system gnu-build-system) |
805 | (native-inputs | |
806 | `(("pkg-config" ,pkg-config) | |
807 | ("which" ,which))) | |
808 | (inputs | |
809 | `(("mesa" ,mesa) | |
810 | ("mupen64plus-core" ,mupen64plus-core) | |
811 | ("sdl2" ,sdl2))) | |
812 | (arguments | |
813 | '(#:phases | |
814 | (modify-phases %standard-phases | |
815 | ;; The mupen64plus build system has no configure phase. | |
816 | (delete 'configure) | |
817 | ;; Makefile is in a subdirectory. | |
818 | (add-before | |
819 | 'build 'cd-to-project-dir | |
820 | (lambda _ | |
821 | (chdir "projects/unix"))) | |
822 | ;; XXX Should be unnecessary with the next release. | |
823 | (add-before | |
824 | 'build 'use-sdl2 | |
825 | (lambda _ | |
826 | (substitute* "Makefile" | |
827 | (("SDL_CONFIG = (.*)sdl-config" all prefix) | |
828 | (string-append "SDL_CONFIG = " prefix "sdl2-config")))))) | |
829 | #:make-flags | |
830 | (let ((out (assoc-ref %outputs "out")) | |
831 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
832 | (list "all" | |
833 | (string-append "PREFIX=" out) | |
834 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
835 | ;; There are no tests. | |
836 | #:tests? #f)) | |
d1e63866 | 837 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
838 | (synopsis "Mupen64Plus Rice Video plugin") |
839 | (description | |
840 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
841 | which is capable of accurately playing many games. This package contains the | |
842 | Glide64 video plugin.") | |
843 | (license license:gpl2+))) | |
844 | ||
845 | (define-public mupen64plus-video-glide64mk2 | |
846 | (package | |
847 | (name "mupen64plus-video-glide64mk2") | |
848 | (version "2.5") | |
849 | (source | |
850 | (origin | |
e5e7a167 TGR |
851 | (method git-fetch) |
852 | (uri (git-reference | |
853 | (url "https://github.com/mupen64plus/mupen64plus-video-glide64mk2.git") | |
854 | (commit version))) | |
855 | (file-name (git-file-name name version)) | |
9af704c5 | 856 | (sha256 |
e5e7a167 | 857 | (base32 "08pm28a36dpr0cvr8pzw0n5ksdazp7jqvlmqfy2lwb4dm0cwhkqd")))) |
9af704c5 RH |
858 | (build-system gnu-build-system) |
859 | (native-inputs | |
860 | `(("pkg-config" ,pkg-config) | |
861 | ("which" ,which))) | |
862 | (inputs | |
863 | `(("boost" ,boost) | |
864 | ("libpng" ,libpng) | |
865 | ("mesa" ,mesa) | |
866 | ("mupen64plus-core" ,mupen64plus-core) | |
867 | ("sdl2" ,sdl2) | |
868 | ("zlib" ,zlib))) | |
869 | (arguments | |
870 | '(#:phases | |
871 | (modify-phases %standard-phases | |
872 | ;; The mupen64plus build system has no configure phase. | |
873 | (delete 'configure) | |
874 | ;; Makefile is in a subdirectory. | |
875 | (add-before | |
876 | 'build 'cd-to-project-dir | |
877 | (lambda _ | |
878 | (chdir "projects/unix")))) | |
879 | #:make-flags | |
880 | (let ((out (assoc-ref %outputs "out")) | |
881 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
882 | (list "all" | |
883 | (string-append "PREFIX=" out) | |
884 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
885 | ;; There are no tests. | |
886 | #:tests? #f)) | |
84532c2b | 887 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
888 | (synopsis "Mupen64Plus Rice Video plugin") |
889 | (description | |
890 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
891 | which is capable of accurately playing many games. This package contains the | |
892 | Glide64MK2 video plugin.") | |
893 | (license license:gpl2+))) | |
894 | ||
895 | (define-public mupen64plus-video-rice | |
896 | (package | |
897 | (name "mupen64plus-video-rice") | |
898 | (version "2.5") | |
899 | (source | |
900 | (origin | |
d42d0a0b TGR |
901 | (method git-fetch) |
902 | (uri (git-reference | |
903 | (url "https://github.com/mupen64plus/mupen64plus-video-rice.git") | |
904 | (commit version))) | |
905 | (file-name (git-file-name name version)) | |
9af704c5 | 906 | (sha256 |
d42d0a0b | 907 | (base32 "0rpmbcq67gsj5h5jjis146378qc1mskskvx20y1ikx59yhbamh13")))) |
9af704c5 RH |
908 | (build-system gnu-build-system) |
909 | (native-inputs | |
910 | `(("pkg-config" ,pkg-config) | |
911 | ("which" ,which))) | |
912 | (inputs | |
913 | `(("libpng" ,libpng) | |
914 | ("mesa" ,mesa) | |
915 | ("mupen64plus-core" ,mupen64plus-core) | |
916 | ("sdl2" ,sdl2))) | |
917 | (arguments | |
918 | '(#:phases | |
919 | (modify-phases %standard-phases | |
920 | ;; The mupen64plus build system has no configure phase. | |
921 | (delete 'configure) | |
922 | ;; Makefile is in a subdirectory. | |
923 | (add-before | |
924 | 'build 'cd-to-project-dir | |
925 | (lambda _ | |
926 | (chdir "projects/unix")))) | |
927 | #:make-flags | |
928 | (let ((out (assoc-ref %outputs "out")) | |
929 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
930 | (list "all" | |
931 | (string-append "PREFIX=" out) | |
932 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
933 | ;; There are no tests. | |
934 | #:tests? #f)) | |
b21acd21 | 935 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
936 | (synopsis "Mupen64Plus Rice Video plugin") |
937 | (description | |
938 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
939 | which is capable of accurately playing many games. This package contains the | |
940 | Rice Video plugin.") | |
941 | (license license:gpl2+))) | |
942 | ||
943 | (define-public mupen64plus-video-z64 | |
944 | (package | |
945 | (name "mupen64plus-video-z64") | |
946 | (version "2.0.0") | |
947 | (source | |
948 | (origin | |
85baeb20 TGR |
949 | (method git-fetch) |
950 | (uri (git-reference | |
951 | (url "https://github.com/mupen64plus/mupen64plus-video-z64.git") | |
952 | (commit version))) | |
953 | (file-name (git-file-name name version)) | |
9af704c5 | 954 | (sha256 |
85baeb20 | 955 | (base32 "04qa2fdd6dakpk2v0d4l80xh9b4h8gm71g80c0wyyxdhmhwk1r9c")) |
fdb61400 | 956 | (patches (search-patches "mupen64plus-video-z64-glew-correct-path.patch")))) |
9af704c5 RH |
957 | (build-system gnu-build-system) |
958 | (native-inputs | |
959 | `(("pkg-config" ,pkg-config) | |
960 | ("which" ,which))) | |
961 | (inputs | |
962 | `(("glew" ,glew) | |
963 | ("mupen64plus-core" ,mupen64plus-core) | |
964 | ("sdl2" ,sdl2))) | |
965 | (arguments | |
966 | '(#:phases | |
967 | (modify-phases %standard-phases | |
968 | ;; The mupen64plus build system has no configure phase. | |
969 | (delete 'configure) | |
970 | ;; Makefile is in a subdirectory. | |
971 | (add-before | |
972 | 'build 'cd-to-project-dir | |
973 | (lambda _ | |
974 | (chdir "projects/unix"))) | |
975 | ;; XXX Should be unnecessary with the next release. | |
976 | (add-before | |
977 | 'build 'use-sdl2 | |
978 | (lambda _ | |
979 | (substitute* "Makefile" | |
980 | (("SDL_CONFIG = (.*)sdl-config" all prefix) | |
981 | (string-append "SDL_CONFIG = " prefix "sdl2-config")))))) | |
982 | #:make-flags | |
983 | (let ((out (assoc-ref %outputs "out")) | |
984 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
985 | (list "all" | |
986 | (string-append "PREFIX=" out) | |
987 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
988 | ;; There are no tests. | |
989 | #:tests? #f)) | |
26daadb9 | 990 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
991 | (synopsis "Mupen64Plus Z64 video plugin") |
992 | (description | |
993 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
994 | which is capable of accurately playing many games. This package contains the | |
995 | Z64 video plugin.") | |
996 | (license license:gpl2+))) | |
997 | ||
998 | (define-public mupen64plus-ui-console | |
999 | (package | |
1000 | (name "mupen64plus-ui-console") | |
1001 | (version "2.5") | |
1002 | (source | |
1003 | (origin | |
225157a0 TGR |
1004 | (method git-fetch) |
1005 | (uri (git-reference | |
1006 | (url "https://github.com/mupen64plus/mupen64plus-ui-console.git") | |
1007 | (commit version))) | |
1008 | (file-name (git-file-name name version)) | |
9af704c5 | 1009 | (sha256 |
225157a0 | 1010 | (base32 "0vrf98qa6a0y3647kslsv644fag233dxh5dcr1yncjiiwickcr5a")) |
9af704c5 RH |
1011 | (patches (search-patches "mupen64plus-ui-console-notice.patch")))) |
1012 | (build-system gnu-build-system) | |
1013 | (native-inputs | |
1014 | `(("pkg-config" ,pkg-config) | |
1015 | ("which" ,which))) | |
1016 | (inputs | |
1017 | `(("sdl2" ,sdl2))) | |
1018 | ;; Mupen64Plus supports a single data directory and a single plugin | |
1019 | ;; directory in its configuration, yet we need data and plugin files from | |
1020 | ;; a variety of packages. The best way to deal with this is to install | |
1021 | ;; all packages from which data and plugin files are needed into one's | |
1022 | ;; profile, and point the configuration there. Hence, propagate the most | |
1023 | ;; important packages here to save the user from the bother. The patch | |
1024 | ;; mupen64plus-ui-console-notice also gives users instructions on what | |
1025 | ;; they need to do in order to point the configuration to their profile. | |
1026 | (propagated-inputs | |
1027 | `(("mupen64plus-core" ,mupen64plus-core) | |
1028 | ("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl) | |
1029 | ("mupen64plus-input-sdl" ,mupen64plus-input-sdl) | |
1030 | ("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle) | |
1031 | ("mupen64plus-video-glide64" ,mupen64plus-video-glide64) | |
1032 | ("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2) | |
1033 | ("mupen64plus-video-rice" ,mupen64plus-video-rice))) | |
1034 | (arguments | |
1035 | '(#:phases | |
1036 | (modify-phases %standard-phases | |
1037 | ;; The mupen64plus build system has no configure phase. | |
1038 | (delete 'configure) | |
1039 | ;; Makefile is in a subdirectory. | |
1040 | (add-before | |
1041 | 'build 'cd-to-project-dir | |
1042 | (lambda _ | |
1043 | (chdir "projects/unix")))) | |
1044 | #:make-flags | |
1045 | (let ((out (assoc-ref %outputs "out")) | |
1046 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
1047 | (list "all" | |
1048 | (string-append "PREFIX=" out) | |
1049 | (string-append "APIDIR=" m64p "/include/mupen64plus") | |
1050 | ;; Trailing slash matters here. | |
1051 | (string-append "COREDIR=" m64p "/lib/"))) | |
1052 | ;; There are no tests. | |
1053 | #:tests? #f)) | |
e8079ba4 | 1054 | (home-page "https://www.mupen64plus.org/") |
ff452bea | 1055 | (synopsis "Mupen64Plus command line user interface") |
9af704c5 RH |
1056 | (description |
1057 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
1058 | which is capable of accurately playing many games. This package contains the | |
1059 | command line user interface. Installing this package is the easiest way | |
1060 | towards a working Mupen64Plus for casual users.") | |
1061 | (license license:gpl2+))) | |
1062 | ||
1063 | (define-public nestopia-ue | |
1064 | (package | |
1065 | (name "nestopia-ue") | |
9d39c300 | 1066 | (version "1.48") |
3e461b71 TGR |
1067 | (source |
1068 | (origin | |
1069 | (method git-fetch) | |
1070 | (uri (git-reference | |
1071 | (url "https://github.com/rdanbrook/nestopia.git") | |
1072 | (commit version))) | |
1073 | (file-name (git-file-name name version)) | |
1074 | (sha256 | |
1075 | (base32 "19c8vx5yxbysl0sszk5blfngwacshdgwbf44g1qaxvq8ywiyxmb4")) | |
1076 | (modules '((guix build utils))) | |
1077 | (snippet | |
1078 | '(begin | |
1079 | ;; We don't need libretro for the GNU/Linux build. | |
1080 | (delete-file-recursively "libretro") | |
1081 | #t)))) | |
9d39c300 | 1082 | (build-system cmake-build-system) |
9af704c5 RH |
1083 | (native-inputs |
1084 | `(("pkg-config" ,pkg-config))) | |
1085 | (inputs | |
1086 | `(("ao" ,ao) | |
9af704c5 RH |
1087 | ("gtk+" ,gtk+) |
1088 | ("libarchive" ,libarchive) | |
9d39c300 | 1089 | ("libepoxy" ,libepoxy) |
9af704c5 RH |
1090 | ("sdl2" ,sdl2) |
1091 | ("zlib" ,zlib))) | |
1092 | (arguments | |
1093 | '(#:phases | |
1094 | (modify-phases %standard-phases | |
9d39c300 KK |
1095 | ;; This fixes the file chooser crash that happens with GTK 3. |
1096 | (add-after 'install 'wrap-program | |
1097 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1098 | (let* ((out (assoc-ref outputs "out")) | |
1099 | (nestopia (string-append out "/bin/nestopia")) | |
1100 | (gtk (assoc-ref inputs "gtk+")) | |
1101 | (gtk-share (string-append gtk "/share"))) | |
1102 | (wrap-program nestopia | |
1103 | `("XDG_DATA_DIRS" ":" prefix (,gtk-share))))))) | |
9af704c5 RH |
1104 | ;; There are no tests. |
1105 | #:tests? #f)) | |
1106 | (home-page "http://0ldsk00l.ca/nestopia/") | |
1107 | (synopsis "Nintendo Entertainment System (NES/Famicom) emulator") | |
1108 | (description | |
1109 | "Nestopia UE (Undead Edition) is a fork of the Nintendo Entertainment | |
1110 | System (NES/Famicom) emulator Nestopia, with enhancements from members of the | |
1111 | emulation community. It provides highly accurate emulation.") | |
1112 | (license license:gpl2+))) | |
1113 | ||
1114 | (define-public retroarch | |
1115 | (package | |
1116 | (name "retroarch") | |
bd671624 | 1117 | (version "1.8.1") |
9af704c5 RH |
1118 | (source |
1119 | (origin | |
1fc346de TGR |
1120 | (method git-fetch) |
1121 | (uri (git-reference | |
1122 | (url "https://github.com/libretro/RetroArch.git") | |
1123 | (commit (string-append "v" version)))) | |
1124 | (file-name (git-file-name name version)) | |
9af704c5 | 1125 | (sha256 |
77549754 TGR |
1126 | (base32 "0y7rcpz7psf8k3agsrq277jdm651vbnn9xpqvmj2in1a786idya7")) |
1127 | (patches | |
1128 | (search-patches "retroarch-disable-online-updater.patch")) | |
1129 | (modules '((guix build utils))) | |
1130 | (snippet | |
1131 | '(begin | |
1132 | ;; Don't suggest using the Online Updater if available: it never | |
1133 | ;; is. This disables translation of this particular message. | |
1134 | (substitute* (find-files "menu/drivers" "\\.c$") | |
1135 | (("msg_hash_to_str\\(MSG_MISSING_ASSETS\\)") | |
1136 | "\"Warning: Missing assets, go get some\"")) | |
1137 | #t)))) | |
9af704c5 RH |
1138 | (build-system gnu-build-system) |
1139 | (arguments | |
f21967a4 | 1140 | `(#:tests? #f ; no tests |
9af704c5 RH |
1141 | #:phases |
1142 | (modify-phases %standard-phases | |
1143 | (replace 'configure | |
1144 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1145 | (let* ((out (assoc-ref outputs "out")) | |
1146 | (etc (string-append out "/etc")) | |
12a3abc6 RH |
1147 | (vulkan (assoc-ref inputs "vulkan-loader")) |
1148 | (wayland-protocols (assoc-ref inputs "wayland-protocols"))) | |
77549754 | 1149 | ;; Hard-code some store file names. |
9af704c5 RH |
1150 | (substitute* "gfx/common/vulkan_common.c" |
1151 | (("libvulkan.so") (string-append vulkan "/lib/libvulkan.so"))) | |
12a3abc6 RH |
1152 | (substitute* "gfx/common/wayland/generate_wayland_protos.sh" |
1153 | (("/usr/local/share/wayland-protocols") | |
1154 | (string-append wayland-protocols "/share/wayland-protocols"))) | |
9af704c5 RH |
1155 | (substitute* "qb/qb.libs.sh" |
1156 | (("/bin/true") (which "true"))) | |
77549754 | 1157 | |
fade67ab EF |
1158 | ;; Use shared zlib. |
1159 | (substitute* '("libretro-common/file/archive_file_zlib.c" | |
e85bb00c | 1160 | "libretro-common/streams/trans_stream_zlib.c") |
fade67ab | 1161 | (("<compat/zlib.h>") "<zlib.h>")) |
77549754 | 1162 | |
9af704c5 RH |
1163 | ;; The configure script does not yet accept the extra arguments |
1164 | ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase. | |
f21967a4 EF |
1165 | (invoke |
1166 | "./configure" | |
1167 | ,@(if (string-prefix? "armhf" (or (%current-target-system) | |
1168 | (%current-system))) | |
1169 | '("--enable-neon" "--enable-floathard") | |
1170 | '()) | |
1171 | (string-append "--prefix=" out) | |
73dd0654 TGR |
1172 | (string-append "--global-config-dir=" etc) |
1173 | "--disable-builtinminiupnpc"))))))) | |
9af704c5 RH |
1174 | (inputs |
1175 | `(("alsa-lib" ,alsa-lib) | |
1176 | ("ffmpeg" ,ffmpeg) | |
1177 | ("freetype" ,freetype) | |
1178 | ("libxinerama" ,libxinerama) | |
1179 | ("libxkbcommon" ,libxkbcommon) | |
1180 | ("libxml2" ,libxml2) | |
45267af1 | 1181 | ("libxrandr" ,libxrandr) |
9af704c5 RH |
1182 | ("libxv" ,libxv) |
1183 | ("mesa" ,mesa) | |
73dd0654 | 1184 | ("miniupnpc" ,miniupnpc) |
9af704c5 RH |
1185 | ("openal" ,openal) |
1186 | ("pulseaudio" ,pulseaudio) | |
1187 | ("python" ,python) | |
76b7d8fd | 1188 | ("qtbase" ,qtbase) |
9af704c5 RH |
1189 | ("sdl" ,sdl2) |
1190 | ("udev" ,eudev) | |
e6fcf903 | 1191 | ("vulkan-loader" ,vulkan-loader) |
c695fb76 | 1192 | ("wayland" ,wayland) |
9af704c5 RH |
1193 | ("zlib" ,zlib))) |
1194 | (native-inputs | |
1195 | `(("pkg-config" ,pkg-config) | |
12a3abc6 | 1196 | ("wayland-protocols" ,wayland-protocols) |
9af704c5 RH |
1197 | ("which" ,which))) |
1198 | (home-page "https://www.libretro.com/") | |
1199 | (synopsis "Reference frontend for the libretro API") | |
1200 | (description | |
1201 | "Libretro is a simple but powerful development interface that allows for | |
1202 | the easy creation of emulators, games and multimedia applications that can plug | |
1203 | straight into any libretro-compatible frontend. RetroArch is the official | |
1204 | reference frontend for the libretro API, currently used by most as a modular | |
1205 | multi-system game/emulator system.") | |
1206 | (license license:gpl3+))) | |
4c40ed9d NG |
1207 | |
1208 | (define-public scummvm | |
1209 | (package | |
1210 | (name "scummvm") | |
2d4b2488 | 1211 | (version "2.1.1") |
4c40ed9d NG |
1212 | (source |
1213 | (origin | |
1214 | (method url-fetch) | |
1215 | (uri (string-append "http://www.scummvm.org/frs/scummvm/" version | |
1216 | "/scummvm-" version ".tar.xz")) | |
1217 | (sha256 | |
2d4b2488 | 1218 | (base32 "1a6waf1ybp91nwva8g650cljlfb1di4l0jv13vg6yfgkas9pclsp")))) |
4c40ed9d NG |
1219 | (build-system gnu-build-system) |
1220 | (arguments | |
6177b14b | 1221 | `(#:tests? #f ;require "git" |
4c40ed9d NG |
1222 | #:configure-flags (list "--enable-release") ;for optimizations |
1223 | #:phases | |
1224 | (modify-phases %standard-phases | |
161b297b NG |
1225 | (add-after 'unpack 'fix-build |
1226 | ;; XXX: The following works around a build failure introduced when | |
1227 | ;; Fluidsynth was updated to version 2.1. It has been applied | |
1228 | ;; upstream as 68758a879e0c8ecc0d40962516d4e808aa4e15e5 and can be | |
2d4b2488 | 1229 | ;; removed once this commit makes it into a release. |
161b297b NG |
1230 | (lambda _ |
1231 | (substitute* "audio/softsynth/fluidsynth.cpp" | |
1232 | (("#include <fluidsynth.h>") "") | |
1233 | (("#include \"common/scummsys.h\"") "#include \"config.h\"") | |
1234 | (("#include \"common/config-manager.h\"" line) | |
1235 | (string-append "#include <fluidsynth.h>\n" | |
1236 | "#include \"common/scummsys.h\"\n" | |
1237 | line))) | |
1238 | #t)) | |
4c40ed9d NG |
1239 | (replace 'configure |
1240 | ;; configure does not work followed by both "SHELL=..." and | |
1241 | ;; "CONFIG_SHELL=..."; set environment variables instead | |
1242 | (lambda* (#:key outputs configure-flags #:allow-other-keys) | |
1243 | (let* ((out (assoc-ref outputs "out")) | |
1244 | (bash (which "bash")) | |
1245 | (flags `(,(string-append "--prefix=" out) | |
1246 | ,@configure-flags))) | |
1247 | (setenv "SHELL" bash) | |
1248 | (setenv "CONFIG_SHELL" bash) | |
1249 | (apply invoke "./configure" flags))))))) | |
1250 | (native-inputs | |
64e9d128 NG |
1251 | `(("nasm" ,nasm) |
1252 | ("pkg-config" ,pkg-config))) | |
4c40ed9d NG |
1253 | (inputs |
1254 | `(("alsa-lib" ,alsa-lib) | |
1255 | ("faad2" ,faad2) | |
1256 | ("fluidsynth" ,fluidsynth) | |
1257 | ("freetype" ,freetype) | |
6177b14b | 1258 | ("liba52" ,liba52) |
4c40ed9d NG |
1259 | ("libflac" ,flac) |
1260 | ("libjpeg-turbo" ,libjpeg-turbo) | |
1261 | ("libmad" ,libmad) | |
1262 | ("libmpeg2" ,libmpeg2) | |
1263 | ("libogg" ,libogg) | |
1264 | ("libpng" ,libpng) | |
1265 | ("libtheora" ,libtheora) | |
1266 | ("libvorbis" ,libvorbis) | |
6177b14b | 1267 | ("sdl2" ,(sdl-union (list sdl2 sdl2-net))) |
4c40ed9d NG |
1268 | ("zlib" ,zlib))) |
1269 | (home-page "https://www.scummvm.org/") | |
1270 | (synopsis "Engine for several graphical adventure games") | |
1271 | (description "ScummVM is a program which allows you to run certain | |
1272 | classic graphical point-and-click adventure games, provided you | |
1273 | already have their data files. The clever part about this: ScummVM | |
1274 | just replaces the executables shipped with the games, allowing you to | |
1275 | play them on systems for which they were never designed!") | |
1276 | (license license:gpl2+))) | |
c8b2fd28 NG |
1277 | |
1278 | (define-public mame | |
1279 | (package | |
1280 | (name "mame") | |
0b15c110 | 1281 | (version "0.218") |
c8b2fd28 NG |
1282 | (source |
1283 | (origin | |
1284 | (method git-fetch) | |
1285 | (uri (git-reference | |
1286 | (url "https://github.com/mamedev/mame.git") | |
1287 | (commit (apply string-append "mame" (string-split version #\.))))) | |
1288 | (file-name (git-file-name name version)) | |
1289 | (sha256 | |
0b15c110 | 1290 | (base32 "1c43hqfabc7spkyk5ma4bjdb0yqm93sdg5g13ka8mvi462snrfd7")) |
c8b2fd28 NG |
1291 | (modules '((guix build utils))) |
1292 | (snippet | |
1293 | ;; Remove bundled libraries. | |
1294 | '(begin | |
1295 | (with-directory-excursion "3rdparty" | |
1296 | (for-each delete-file-recursively | |
1297 | '("asio" "expat" "glm" "libflac" "libjpeg" "lua" | |
1298 | "portaudio" "portmidi" "pugixml" "rapidjson" "SDL2" | |
1299 | "SDL2-override" "sqlite3" "utf8proc" "zlib"))) | |
1300 | #t)))) | |
1301 | (build-system gnu-build-system) | |
1302 | (arguments | |
1303 | `(#:make-flags | |
1304 | (cons* | |
430e1528 NG |
1305 | ;; A 'strict-overflow' error pops up on i686 so disable '-Werror'. |
1306 | "NOWERROR=1" | |
c8b2fd28 NG |
1307 | (string-append "QT_HOME=" (assoc-ref %build-inputs "qtbase")) |
1308 | (string-append "SDL_INI_PATH=" | |
1309 | (assoc-ref %outputs "out") | |
1310 | "/share/mame/ini") | |
1311 | (map (lambda (lib) | |
1312 | (string-append "USE_SYSTEM_LIB_" (string-upcase lib) "=1")) | |
1313 | '("asio" "expat" "flac" "glm" "jpeg" "lua" "portaudio" "portmidi" | |
1314 | "pugixml" "rapidjson" "sqlite3" "utf8proc" "zlib"))) | |
1315 | #:tests? #f ;no test in regular release | |
1316 | #:phases | |
1317 | (modify-phases %standard-phases | |
1318 | (delete 'configure) | |
1319 | (add-after 'build 'build-documentation | |
1320 | (lambda _ (invoke "make" "-C" "docs" "man" "info"))) | |
1321 | (replace 'install | |
1322 | ;; Upstream does not provide an installation phase. | |
1323 | (lambda* (#:key outputs #:allow-other-keys) | |
1324 | (let* ((out (assoc-ref outputs "out")) | |
1325 | (share (string-append out "/share/mame"))) | |
1326 | ;; Install data. | |
1327 | (for-each (lambda (dir) | |
1328 | (copy-recursively dir (string-append share "/" dir))) | |
1329 | '("artwork" "bgfx" "ctrlr" "hash" "ini" "language" | |
1330 | "plugins" "samples")) | |
1331 | (let ((keymaps (string-append share "/keymaps"))) | |
1332 | (for-each (lambda (file) (install-file file keymaps)) | |
1333 | (find-files "keymaps" ".*LINUX\\.map"))) | |
1334 | (let ((fonts (string-append share "/fonts"))) | |
1335 | (install-file "uismall.bdf" fonts)) | |
6921e95a EF |
1336 | (when (file-exists? "mame64") |
1337 | (rename-file "mame64" "mame")) | |
c8b2fd28 NG |
1338 | (install-file "mame" (string-append out "/bin"))) |
1339 | #t)) | |
1340 | (add-after 'install 'install-documentation | |
1341 | (lambda* (#:key outputs #:allow-other-keys) | |
1342 | (let* ((out (assoc-ref outputs "out")) | |
1343 | (man (string-append out "/share/man/man1")) | |
1344 | (info (string-append out "/share/info"))) | |
1345 | (install-file "docs/build/man/MAME.1" man) | |
1346 | (install-file "docs/build/texinfo/MAME.info" info)) | |
1347 | #t)) | |
1348 | (add-after 'install 'install-ini-file | |
1349 | ;; Generate an ini file so as to set some directories (e.g., roms) | |
1350 | ;; to a writable location, i.e., "$HOME/.mame/" and "$HOME/mame/". | |
1351 | ;; | |
1352 | ;; XXX: We need to insert absolute references to the store. It can | |
1353 | ;; be an issue if they leak into user's home directory, e.g., with | |
1354 | ;; "mame -createconfig" and the package is later GC'ed. | |
1355 | (lambda* (#:key outputs #:allow-other-keys) | |
1356 | (let* ((out (assoc-ref outputs "out")) | |
1357 | (share (string-append out "/share/mame")) | |
1358 | (ini (string-append share "/ini"))) | |
1359 | (with-output-to-file (string-append ini "/mame.ini") | |
1360 | (lambda _ | |
1361 | (format #t | |
1362 | "inipath $HOME/.mame;~a/ini~@ | |
1363 | homepath $HOME/mame~@ | |
1364 | rompath $HOME/mame/roms~@ | |
1365 | samplepath $HOME/mame/samples;~a/samples~@ | |
1366 | cheatpath $HOME/mame/cheat~@ | |
1367 | artpath $HOME/mame/artwork;~a/artwork~@ | |
1368 | crosshairpath $HOME/mame/crosshair~@ | |
1369 | snapshot_directory $HOME/mame/snapshots~@ | |
1370 | hashpath ~a/hash~@ | |
1371 | fontpath $HOME/mame/fonts;~a/fonts~@ | |
1372 | ctrlrpath $HOME/mame/ctrlr;~a/ctrlr~@ | |
1373 | bgfx_path ~a/bgfx~@ | |
1374 | pluginspath $HOME/mame/plugins;~a/plugins~@ | |
1375 | languagepath ~a/language~@ | |
1376 | cfg_directory $HOME/.mame/cfg~@ | |
1377 | nvram_directory $HOME/.mame/nvram~@ | |
1378 | input_directory $HOME/.mame/inp~@ | |
1379 | state_directory $HOME/.mame/sta~@ | |
1380 | diff_directory $HOME/.mame/diff~@ | |
1381 | comment_directory $HOME/.mame/comments~%" | |
1382 | share share share share share share share share | |
1383 | share))) | |
1384 | (with-output-to-file (string-append ini "/ui.ini") | |
1385 | (lambda _ | |
1386 | (format #t | |
1387 | "historypath $HOME/mame/history~@ | |
1388 | categorypath $HOME/mame/folders~@ | |
1389 | cabinets_directory $HOME/mame/cabinets~@ | |
1390 | cpanels_directory $HOME/mame/cpanel~@ | |
1391 | pcbs_directory $HOME/mame/pcb~@ | |
1392 | flyers_directory $HOME/mame/flyers~@ | |
1393 | titles_directory $HOME/mame/titles~@ | |
1394 | ends_directory $HOME/mame/ends~@ | |
1395 | marquees_directory $HOME/mame/marquees~@ | |
1396 | artwork_preview_directory $HOME/mame/artpreview~@ | |
1397 | bosses_directory $HOME/mame/bosses~@ | |
1398 | logos_directory $HOME/mame/logo~@ | |
1399 | scores_directory $HOME/mame/scores~@ | |
1400 | versus_directory $HOME/mame/versus~@ | |
1401 | gameover_directory $HOME/mame/gameover~@ | |
1402 | howto_directory $HOME/mame/howto~@ | |
1403 | select_directory $HOME/mame/select~@ | |
1404 | icons_directory $HOME/mame/icons~@ | |
1405 | covers_directory $HOME/mame/covers~@ | |
1406 | ui_path $HOME/.mame/ui~%"))) | |
1407 | #t))) | |
1408 | (add-after 'install 'install-desktop-file | |
1409 | (lambda* (#:key outputs #:allow-other-keys) | |
1410 | (let* ((out (assoc-ref outputs "out")) | |
1411 | (desktop (string-append out "/share/applications")) | |
1412 | (executable (string-append out "/bin/mame"))) | |
1413 | (mkdir-p desktop) | |
1414 | (with-output-to-file (string-append desktop "/mame.desktop") | |
1415 | (lambda _ | |
1416 | (format #t | |
1417 | "[Desktop Entry]~@ | |
1418 | Name=mame~@ | |
1419 | Comment=Multi-purpose emulation framework~@ | |
1420 | Exec=~a~@ | |
1421 | TryExec=~@*~a~@ | |
1422 | Terminal=false~@ | |
1423 | Type=Application~@ | |
1424 | Categories=Game;Emulator;~@ | |
1425 | Keywords=Game;Emulator;Arcade;~%" | |
1426 | executable))) | |
1427 | #t)))))) | |
1428 | (native-inputs | |
1429 | `(("pkg-config" ,pkg-config) | |
03370346 NG |
1430 | ("sphinx" ,python-sphinx) |
1431 | ("sphinxcontrib-svg2pdfconverter" ,python-sphinxcontrib-svg2pdfconverter) | |
c8b2fd28 NG |
1432 | ("texinfo" ,texinfo))) |
1433 | (inputs | |
1434 | `(("alsa-lib" ,alsa-lib) | |
1435 | ("asio" ,asio) | |
1436 | ("expat" ,expat) | |
1437 | ("flac" ,flac) | |
1438 | ("fontconfig" ,fontconfig) | |
1439 | ("glm" ,glm) | |
7b24b76b | 1440 | ("libjpeg" ,libjpeg-turbo) |
9f0650df | 1441 | ("libxi" ,libxi) |
c8b2fd28 NG |
1442 | ("libxinerama" ,libxinerama) |
1443 | ("lua" ,lua) | |
1444 | ("portaudio" ,portaudio) | |
1445 | ("portmidi" ,portmidi) | |
63247277 | 1446 | ("pugixml" ,pugixml) |
c8b2fd28 NG |
1447 | ("python-wrapper" ,python-wrapper) |
1448 | ("qtbase" ,qtbase) | |
1449 | ("rapidjson" ,rapidjson) | |
1450 | ("sdl" ,(sdl-union (list sdl2 sdl2-ttf))) | |
1451 | ("sqlite" ,sqlite) | |
1452 | ("utf8proc" ,utf8proc) | |
1453 | ("zlib" ,zlib))) | |
1454 | (home-page "http://mamedev.org/") | |
1455 | (synopsis "Multi-purpose emulation framework") | |
1456 | (description "MAME's purpose is to preserve decades of software | |
1457 | history. As electronic technology continues to rush forward, MAME | |
1458 | prevents this important @emph{vintage} software from being lost and | |
1459 | forgotten. This is achieved by documenting the hardware and how it | |
1460 | functions. The source code to MAME serves as this documentation.") | |
1461 | ;; The MAME project as a whole is distributed under the terms of GPL2+. | |
1462 | ;; However, over 90% of the files are under Expat license. Also, artwork, | |
1463 | ;; keymaps, languages and samples are under CC0. | |
1464 | (license (list license:gpl2+ license:expat license:cc0)))) | |
1403e1f7 PN |
1465 | |
1466 | (define-public pcsxr | |
1467 | ;; No release since 2017. | |
1468 | (let ((commit "6484236cb0281e8040ff6c8078c87899a3407534")) | |
1469 | (package | |
1470 | (name "pcsxr") | |
1471 | ;; Version is tagged here: https://github.com/frealgagu/PCSX-Reloaded | |
1472 | (version "1.9.95") | |
1473 | (source | |
1474 | (origin | |
1475 | (method git-fetch) | |
1476 | (uri (git-reference | |
1477 | (url "https://github.com/pcsxr/PCSX-Reloaded") | |
1478 | (commit commit))) | |
1479 | (sha256 | |
1480 | (base32 | |
1481 | "138mayp7zi9v4l3lm5f6xxkds619w1fgg769zm8s45c84jbz7dza")) | |
1482 | (file-name (git-file-name name commit)))) | |
1483 | (build-system cmake-build-system) | |
1484 | (arguments | |
1485 | `(#:tests? #f ;no "test" target | |
1486 | #:configure-flags | |
1487 | (list "-DSND_BACKEND=pulse" | |
1488 | "-DENABLE_CCDDA='ON'" | |
1489 | "-DUSE_LIBARCHIVE='ON'" | |
1490 | "-DUSE_LIBCDIO='ON'") | |
1491 | #:phases | |
1492 | (modify-phases %standard-phases | |
1493 | (add-after 'unpack 'cd-subdir | |
1ef71f52 | 1494 | (lambda _ (chdir "pcsxr") #t)) |
1403e1f7 PN |
1495 | (add-before 'configure 'fix-cdio-lookup |
1496 | (lambda* (#:key inputs #:allow-other-keys) | |
1497 | (substitute* "cmake/FindCdio.cmake" | |
1498 | (("/usr/include/cdio") | |
1ef71f52 KK |
1499 | (string-append (assoc-ref inputs "libcdio") "/include/cdio"))) |
1500 | #t)) | |
1501 | (add-after 'install 'wrap-program | |
1502 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1503 | (wrap-program (string-append (assoc-ref outputs "out") | |
1504 | "/bin/pcsxr") | |
1505 | ;; For GtkFileChooserDialog. | |
1506 | `("GSETTINGS_SCHEMA_DIR" = | |
1507 | (,(string-append (assoc-ref inputs "gtk+") | |
1508 | "/share/glib-2.0/schemas")))) | |
1509 | #t))))) | |
1403e1f7 PN |
1510 | (native-inputs |
1511 | `(("pkg-config" ,pkg-config) | |
1512 | ("intltool" ,intltool) | |
1513 | ("glib" ,glib "bin"))) | |
1514 | (inputs | |
1515 | `(("libcdio" ,libcdio) | |
1516 | ("sdl2" ,sdl2) | |
1517 | ("gtk+" ,gtk+) | |
1518 | ("ffmpeg" ,ffmpeg) | |
1519 | ("libxv" ,libxv) | |
1520 | ("libarchive" ,libarchive) | |
1521 | ("pulseaudio" ,pulseaudio))) | |
1522 | (home-page "https://archive.codeplex.com/?p=pcsxr") | |
1523 | (synopsis "PlayStation emulator") | |
1524 | (description | |
1525 | "A PlayStation emulator based on PCSX-df Project with bugfixes and | |
1526 | improvements.") | |
1527 | (license license:gpl2+)))) | |
f6a0be2f DW |
1528 | |
1529 | (define-public gens-gs | |
1530 | (package | |
1531 | (name "gens-gs") | |
1532 | (version "7") | |
1533 | (source | |
1534 | (origin | |
1535 | (method url-fetch) | |
1536 | (uri (string-append "https://retrocdn.net/images/6/6d/Gens-gs-r" | |
1537 | version ".tar.gz")) | |
1538 | (sha256 | |
1539 | (base32 | |
1540 | "1ha5s6d3y7s9aq9f4zmn9p88109c3mrj36z2w68jhiw5xrxws833")))) | |
1541 | (build-system glib-or-gtk-build-system) | |
1542 | (arguments | |
1543 | `(#:system "i686-linux" | |
1544 | #:phases | |
1545 | (modify-phases %standard-phases | |
1546 | (add-after 'unpack 'fix-CFLAGS | |
1547 | (lambda* _ | |
1548 | ;; Remove GTK API deprecation flags that cause build errors. | |
1549 | (substitute* "configure" | |
1550 | (("GTK_CFLAGS=\"\\$GTK_CFLAGS .*\"") "")) | |
1551 | #t))))) | |
1552 | (native-inputs | |
1553 | `(("pkg-config" ,pkg-config) | |
1554 | ("nasm" ,nasm))) | |
1555 | (inputs | |
1556 | `(("sdl" ,sdl) | |
1557 | ("gtk" ,gtk+-2))) | |
1558 | (home-page "https://segaretro.org/Gens/GS") | |
1559 | (synopsis "Emulator for Sega Genesis/Mega Drive systems") | |
1560 | (description | |
1561 | "Gens/GS is an emulator for the Mega Drive (also known as Sega Genesis), | |
1562 | derived from Gens. Project goals include clean source code, combined features | |
1563 | from various forks of Gens, and improved platform portability.") | |
1564 | (supported-systems '("i686-linux" "x86_64-linux")) | |
1565 | (license license:gpl2+))) |