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 | |
277 | (let ((commit "646bede3d9ec0acf0ae378415edac136774a66c5")) | |
278 | (package | |
279 | (name "emulation-station") | |
280 | (version "2.0.1") | |
281 | (source (origin | |
282 | (method git-fetch) ; no tarball available | |
283 | (uri (git-reference | |
284 | (url "https://github.com/Aloshi/EmulationStation.git") | |
285 | (commit commit))) ; no version tag | |
286 | (file-name (string-append name "-" version "-checkout")) | |
287 | (sha256 | |
288 | (base32 | |
289 | "0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v")))) | |
290 | (build-system cmake-build-system) | |
291 | (arguments | |
292 | '(#:tests? #f)) ; no tests | |
293 | (inputs | |
294 | `(("alsa-lib" ,alsa-lib) | |
295 | ("boost" ,boost) | |
296 | ("curl" ,curl) | |
297 | ("eigin" ,eigen) | |
298 | ("freeimage" ,freeimage) | |
299 | ("freetype" ,freetype) | |
300 | ("mesa" ,mesa) | |
301 | ("sdl2" ,sdl2))) | |
302 | (synopsis "Video game console emulator front-end") | |
303 | (description "EmulationStation provides a graphical front-end to a large | |
304 | number of video game console emulators. It features an interface that is | |
305 | usable with any game controller that has at least 4 buttons, theming support, | |
306 | and a game metadata scraper.") | |
307 | (home-page "http://www.emulationstation.org") | |
308 | (license license:expat)))) | |
309 | ||
310 | (define-public higan | |
311 | (package | |
312 | (name "higan") | |
313 | (version "106") | |
314 | (source | |
315 | (origin | |
316 | (method url-fetch) | |
317 | (uri (string-append | |
318 | "https://gitlab.com/higan/higan/repository/archive.tar.gz?ref=v" | |
319 | version)) | |
320 | (file-name (string-append name "-" version ".tar.gz")) | |
321 | (sha256 | |
322 | (base32 "0y42pra0dxzlbkyzcp3r8a39pji2bj3p9fl40425f60af2igr4rw")) | |
323 | (patches (search-patches "higan-remove-march-native-flag.patch")))) | |
324 | (build-system gnu-build-system) | |
325 | (native-inputs | |
326 | `(("pkg-config" ,pkg-config))) | |
327 | (inputs | |
328 | `(("alsa-lib" ,alsa-lib) | |
329 | ("ao" ,ao) | |
330 | ("eudev" ,eudev) | |
331 | ("gtk+" ,gtk+-2) | |
332 | ("gtksourceview-2" ,gtksourceview-2) | |
333 | ("libxv" ,libxv) | |
334 | ("mesa" ,mesa) | |
335 | ("openal" ,openal) | |
336 | ("pulseaudio" ,pulseaudio) | |
337 | ("sdl" ,sdl))) | |
338 | (arguments | |
339 | '(#:phases | |
340 | (let ((build-phase (assoc-ref %standard-phases 'build)) | |
341 | (install-phase (assoc-ref %standard-phases 'install))) | |
342 | (modify-phases %standard-phases | |
343 | ;; The higan build system has no configure phase. | |
344 | (delete 'configure) | |
345 | (add-before 'build 'chdir-to-higan | |
346 | (lambda _ | |
347 | (chdir "higan"))) | |
348 | (add-before 'install 'create-/share/applications | |
349 | (lambda* (#:key outputs #:allow-other-keys) | |
350 | (let ((out (assoc-ref outputs "out"))) | |
351 | ;; It seems the author forgot to do this in the Makefile. | |
352 | (mkdir-p (string-append out "/share/applications"))))) | |
353 | (add-after 'install 'chdir-to-icarus | |
354 | (lambda _ | |
355 | (chdir "../icarus"))) | |
356 | (add-after 'chdir-to-icarus 'build-icarus build-phase) | |
357 | (add-after 'build-icarus 'install-icarus install-phase) | |
358 | (add-after 'install-icarus 'wrap-higan-executable | |
359 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
360 | (let* ((out (assoc-ref outputs "out")) | |
361 | (bin (string-append out "/bin")) | |
362 | (higan (string-append bin "/higan")) | |
363 | (higan-original (string-append higan "-original")) | |
364 | (bash (string-append (assoc-ref inputs "bash") | |
365 | "/bin/bash")) | |
366 | (coreutils (assoc-ref inputs "coreutils")) | |
367 | (mkdir (string-append coreutils "/bin/mkdir")) | |
368 | (cp (string-append coreutils "/bin/cp")) | |
369 | (cp-r (string-append cp " -r --no-preserve=mode"))) | |
370 | ;; First, have the executable make sure ~/.local/share/higan | |
371 | ;; contains up to date files. Higan insists on looking there | |
372 | ;; for these data files. | |
373 | (rename-file higan higan-original) | |
374 | (with-output-to-file higan | |
375 | (lambda () | |
376 | (display | |
377 | (string-append | |
378 | "#!" bash "\n" | |
379 | ;; higan doesn't respect $XDG_DATA_HOME | |
380 | mkdir " -p ~/.local/share\n" | |
381 | cp-r " " out "/share/higan ~/.local/share\n" | |
382 | "exec " higan-original)))) | |
383 | (chmod higan #o555) | |
384 | ;; Second, make sure higan will find icarus in PATH. | |
385 | (wrap-program higan | |
386 | `("PATH" ":" prefix (,bin)))))))) | |
387 | #:make-flags | |
388 | (list "compiler=g++" | |
389 | (string-append "prefix=" (assoc-ref %outputs "out"))) | |
390 | ;; There is no test suite. | |
391 | #:tests? #f)) | |
392 | (home-page "http://byuu.org/emulation/higan/") | |
393 | (synopsis "Nintendo multi-system emulator") | |
394 | (description | |
395 | "higan (formerly bsnes) is an emulator for multiple Nintendo video game | |
396 | consoles, including the Nintendo Entertainment System (NES/Famicom), Super | |
397 | Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy | |
398 | Color (GBC), and Game Boy Advance (GBA). It also supports the subsystems | |
399 | Super Game Boy, BS-X Satellaview, and Sufami Turbo.") | |
400 | ;; As noted in these files among more: | |
401 | ;; - icarus/icarus.cpp | |
402 | ;; - higan/emulator/emulator.hpp | |
403 | (license license:gpl3))) | |
404 | ||
405 | (define-public mgba | |
406 | (package | |
407 | (name "mgba") | |
d63e0ee7 NG |
408 | (version "0.8.0") |
409 | (source | |
410 | (origin | |
411 | (method git-fetch) | |
412 | (uri (git-reference | |
413 | (url "https://github.com/mgba-emu/mgba.git") | |
414 | (commit version))) | |
415 | (file-name (git-file-name name version)) | |
416 | (sha256 | |
417 | (base32 "0m3rgcdv32ms98j7rrmk2hphvn462bwsd6xfz2ssy05398pj4ljh")) | |
418 | (modules '((guix build utils))) | |
419 | (snippet | |
420 | ;; Make sure we don't use the bundled software. | |
421 | '(begin | |
422 | (for-each | |
423 | (lambda (subdir) | |
424 | (let ((lib-subdir (string-append "src/third-party/" subdir))) | |
425 | (delete-file-recursively lib-subdir))) | |
426 | '("libpng" "lzma" "sqlite3" "zlib")) | |
427 | #t)))) | |
9af704c5 RH |
428 | (build-system cmake-build-system) |
429 | (arguments | |
430 | `(#:tests? #f ;no "test" target | |
431 | #:configure-flags | |
432 | (list "-DUSE_LZMA=OFF" ;do not use bundled LZMA | |
6ea1c6fc | 433 | "-DUSE_LIBZIP=OFF"))) ;use "zlib" instead |
9af704c5 RH |
434 | (native-inputs `(("pkg-config" ,pkg-config))) |
435 | (inputs `(("ffmpeg" ,ffmpeg) | |
436 | ("imagemagick" ,imagemagick) | |
437 | ("libedit" ,libedit) | |
6dcac920 | 438 | ("libelf" ,libelf) |
9af704c5 RH |
439 | ("libepoxy" ,libepoxy) |
440 | ("libpng" ,libpng) | |
441 | ("mesa" ,mesa) | |
442 | ("minizip" ,minizip) | |
443 | ("ncurses" ,ncurses) | |
444 | ("qtbase" ,qtbase) | |
445 | ("qtmultimedia" ,qtmultimedia) | |
446 | ("qttools" ,qttools) | |
447 | ("sdl2" ,sdl2) | |
448 | ("sqlite" ,sqlite) | |
449 | ("zlib" ,zlib))) | |
450 | (home-page "https://mgba.io") | |
451 | (synopsis "Game Boy Advance emulator") | |
452 | (description | |
453 | "mGBA is an emulator for running Game Boy Advance games. It aims to be | |
454 | faster and more accurate than many existing Game Boy Advance emulators, as | |
455 | well as adding features that other emulators lack. It also supports Game Boy | |
456 | and Game Boy Color games.") | |
457 | ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+ and "inih.c" is | |
458 | ;; BSD-3. | |
459 | (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3)))) | |
460 | ||
c9e7acbf JK |
461 | (define-public sameboy |
462 | (package | |
463 | (name "sameboy") | |
464 | (version "0.12.3") | |
465 | (source | |
466 | (origin | |
467 | (method git-fetch) | |
468 | (uri (git-reference | |
469 | (url "https://github.com/LIJI32/SameBoy.git") | |
470 | (commit (string-append "v" version)))) | |
471 | (file-name (git-file-name name version)) | |
472 | (sha256 | |
473 | (base32 "0m5rv2x8qck1kr43xq186pp4kaiay7gd1x775n9qrljcd7z4x6fs")))) | |
474 | (build-system gnu-build-system) | |
475 | (native-inputs | |
476 | `(("rgbds" ,rgbds) | |
477 | ("gcc" ,gcc-9) | |
478 | ("pkg-config" ,pkg-config))) | |
479 | (inputs | |
480 | `(("sdl2" ,sdl2))) | |
481 | (arguments | |
482 | `(#:tests? #f ; There are no tests | |
483 | #:make-flags `("CC=gcc" "CONF=release" | |
484 | ,(string-append "DATA_DIR=" | |
485 | (assoc-ref %outputs "out") | |
486 | "/share/sameboy/")) | |
487 | #:phases | |
488 | (modify-phases %standard-phases | |
489 | (delete 'configure) | |
490 | (replace 'install | |
491 | (lambda* (#:key outputs #:allow-other-keys) | |
492 | (let* ((out (assoc-ref outputs "out")) | |
493 | (bin (string-append out "/bin")) | |
494 | (data (string-append out "/share/sameboy/"))) | |
495 | (with-directory-excursion "build/bin/SDL" | |
496 | (install-file "sameboy" bin) | |
497 | (delete-file "sameboy") | |
498 | (copy-recursively "." data)))))))) | |
499 | (home-page "https://sameboy.github.io/") | |
500 | (synopsis "Accurate Game Boy, Game Boy Color and Super Game Boy emulator") | |
501 | (description "SameBoy is a user friendly Game Boy, Game Boy Color | |
502 | and Super Game Boy emulator. SameBoy is accurate and includes a wide | |
503 | range of debugging features. It has all the features one would expect | |
504 | from an emulator---from save states to scaling filters.") | |
505 | (license license:expat))) | |
506 | ||
9af704c5 RH |
507 | (define-public mupen64plus-core |
508 | (package | |
509 | (name "mupen64plus-core") | |
510 | (version "2.5") | |
511 | (source | |
512 | (origin | |
10bcd4bb TGR |
513 | (method git-fetch) |
514 | (uri (git-reference | |
515 | (url "https://github.com/mupen64plus/mupen64plus-core.git") | |
516 | (commit version))) | |
517 | (file-name (git-file-name name version)) | |
9af704c5 | 518 | (sha256 |
10bcd4bb | 519 | (base32 "116fndl6652zrp1r6ag4xv3dzp1x52mlvadj8xwflq07fd5rhri1")))) |
9af704c5 RH |
520 | (build-system gnu-build-system) |
521 | (native-inputs | |
522 | `(("pkg-config" ,pkg-config) | |
523 | ("which" ,which))) | |
524 | (inputs | |
525 | `(("freetype" ,freetype) | |
526 | ("glu" ,glu) | |
527 | ("libpng" ,libpng) | |
528 | ("mesa" ,mesa) | |
529 | ("sdl2" ,sdl2) | |
530 | ("zlib" ,zlib))) | |
531 | (arguments | |
532 | '(#:phases | |
533 | (modify-phases %standard-phases | |
534 | ;; The mupen64plus build system has no configure phase. | |
535 | (delete 'configure) | |
536 | ;; Makefile is in a subdirectory. | |
537 | (add-before | |
eaa2b35c | 538 | 'build 'chdir-to-project-directory |
9af704c5 | 539 | (lambda _ |
eaa2b35c TGR |
540 | (chdir "projects/unix") |
541 | #t))) | |
9af704c5 RH |
542 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
543 | (list "all" (string-append "PREFIX=" out))) | |
544 | ;; There are no tests. | |
545 | #:tests? #f)) | |
546 | ;; As per the Makefile (in projects/unix/Makefile): | |
547 | (supported-systems '("i686-linux" "x86_64-linux")) | |
eaa2b35c | 548 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
549 | (synopsis "Nintendo 64 emulator core library") |
550 | (description | |
551 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
552 | which is capable of accurately playing many games. This package contains the | |
553 | core library.") | |
554 | (license license:gpl2+))) | |
555 | ||
556 | (define-public mupen64plus-audio-sdl | |
557 | (package | |
558 | (name "mupen64plus-audio-sdl") | |
559 | (version "2.5") | |
560 | (source | |
561 | (origin | |
8c6d45cb TGR |
562 | (method git-fetch) |
563 | (uri (git-reference | |
564 | (url "https://github.com/mupen64plus/mupen64plus-audio-sdl.git") | |
565 | (commit version))) | |
566 | (file-name (git-file-name name version)) | |
9af704c5 | 567 | (sha256 |
8c6d45cb | 568 | (base32 "0z19amfg9vr2pqjjri1ipc7hs681fzjcnb0f9y7bjhp5n8d7p6bb")))) |
9af704c5 RH |
569 | (build-system gnu-build-system) |
570 | (native-inputs | |
571 | `(("pkg-config" ,pkg-config) | |
572 | ("which" ,which))) | |
573 | (inputs | |
574 | `(("mupen64plus-core" ,mupen64plus-core) | |
575 | ("sdl2" ,sdl2))) | |
576 | (arguments | |
577 | '(#:phases | |
578 | (modify-phases %standard-phases | |
579 | ;; The mupen64plus build system has no configure phase. | |
580 | (delete 'configure) | |
581 | ;; Makefile is in a subdirectory. | |
582 | (add-before | |
583 | 'build 'cd-to-project-dir | |
584 | (lambda _ | |
585 | (chdir "projects/unix")))) | |
586 | #:make-flags | |
587 | (let ((out (assoc-ref %outputs "out")) | |
588 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
589 | (list "all" | |
590 | (string-append "PREFIX=" out) | |
591 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
592 | ;; There are no tests. | |
593 | #:tests? #f)) | |
cf5e9465 | 594 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
595 | (synopsis "Mupen64Plus SDL input plugin") |
596 | (description | |
597 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
598 | which is capable of accurately playing many games. This package contains the | |
599 | SDL audio plugin.") | |
600 | (license license:gpl2+))) | |
601 | ||
602 | (define-public mupen64plus-input-sdl | |
603 | (package | |
604 | (name "mupen64plus-input-sdl") | |
605 | (version "2.5") | |
606 | (source | |
607 | (origin | |
ef5ef8f5 TGR |
608 | (method git-fetch) |
609 | (uri (git-reference | |
610 | (url "https://github.com/mupen64plus/mupen64plus-input-sdl.git") | |
611 | (commit version))) | |
612 | (file-name (git-file-name name version)) | |
9af704c5 | 613 | (sha256 |
ef5ef8f5 | 614 | (base32 "1dyazfbdjycdfslq8jixqiqhziw0rlkvach2r9dz91229jmkyc9c")))) |
9af704c5 RH |
615 | (build-system gnu-build-system) |
616 | (native-inputs | |
617 | `(("which" ,which))) | |
618 | (inputs | |
619 | `(("mupen64plus-core" ,mupen64plus-core) | |
620 | ("sdl2" ,sdl2))) | |
621 | (arguments | |
622 | '(#:phases | |
623 | (modify-phases %standard-phases | |
624 | ;; The mupen64plus build system has no configure phase. | |
625 | (delete 'configure) | |
626 | ;; Makefile is in a subdirectory. | |
627 | (add-before | |
628 | 'build 'cd-to-project-dir | |
629 | (lambda _ | |
630 | (chdir "projects/unix")))) | |
631 | #:make-flags | |
632 | (let ((out (assoc-ref %outputs "out")) | |
633 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
634 | (list "all" | |
635 | (string-append "PREFIX=" out) | |
636 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
637 | ;; There are no tests. | |
638 | #:tests? #f)) | |
d738ce16 | 639 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
640 | (synopsis "Mupen64Plus SDL input plugin") |
641 | (description | |
642 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
643 | which is capable of accurately playing many games. This package contains the | |
644 | SDL input plugin.") | |
645 | (license license:gpl2+))) | |
646 | ||
647 | (define-public mupen64plus-rsp-hle | |
648 | (package | |
649 | (name "mupen64plus-rsp-hle") | |
650 | (version "2.5") | |
651 | (source | |
652 | (origin | |
c4f0c8ba TGR |
653 | (method git-fetch) |
654 | (uri (git-reference | |
655 | (url "https://github.com/mupen64plus/mupen64plus-rsp-hle.git") | |
656 | (commit version))) | |
657 | (file-name (git-file-name name version)) | |
9af704c5 | 658 | (sha256 |
c4f0c8ba | 659 | (base32 "0pi31qzjjp7aypdvvnz6ms18g09c4gqzxi6328zj8sji94b75gf0")))) |
9af704c5 RH |
660 | (build-system gnu-build-system) |
661 | (inputs | |
662 | `(("mupen64plus-core" ,mupen64plus-core))) | |
663 | (arguments | |
664 | '(#:phases | |
665 | (modify-phases %standard-phases | |
666 | ;; The mupen64plus build system has no configure phase. | |
667 | (delete 'configure) | |
668 | ;; Makefile is in a subdirectory. | |
669 | (add-before | |
670 | 'build 'cd-to-project-dir | |
671 | (lambda _ | |
672 | (chdir "projects/unix")))) | |
673 | #:make-flags | |
674 | (let ((out (assoc-ref %outputs "out")) | |
675 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
676 | (list "all" | |
677 | (string-append "PREFIX=" out) | |
678 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
679 | ;; There are no tests. | |
680 | #:tests? #f)) | |
cf396ea5 | 681 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
682 | (synopsis "Mupen64Plus SDL input plugin") |
683 | (description | |
684 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
685 | which is capable of accurately playing many games. This package contains the | |
686 | high-level emulation (HLE) RSP processor plugin.") | |
687 | (license license:gpl2+))) | |
688 | ||
689 | (define-public mupen64plus-rsp-z64 | |
690 | (package | |
691 | (name "mupen64plus-rsp-z64") | |
692 | (version "2.0.0") | |
693 | (source | |
694 | (origin | |
052650c8 TGR |
695 | (method git-fetch) |
696 | (uri (git-reference | |
697 | (url "https://github.com/mupen64plus/mupen64plus-rsp-z64.git") | |
698 | (commit version))) | |
699 | (file-name (git-file-name name version)) | |
9af704c5 | 700 | (sha256 |
052650c8 | 701 | (base32 "0nfyjns9k8xbg3aqs7593nfaxvlj72h3l8h467442xlk8ajfcylx")))) |
9af704c5 RH |
702 | (build-system gnu-build-system) |
703 | (inputs | |
704 | `(("mupen64plus-core" ,mupen64plus-core))) | |
705 | (arguments | |
706 | '(#:phases | |
707 | (modify-phases %standard-phases | |
708 | ;; The mupen64plus build system has no configure phase. | |
709 | (delete 'configure) | |
710 | ;; Makefile is in a subdirectory. | |
711 | (add-before | |
712 | 'build 'cd-to-project-dir | |
713 | (lambda _ | |
714 | (chdir "projects/unix")))) | |
715 | #:make-flags | |
716 | (let ((out (assoc-ref %outputs "out")) | |
717 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
718 | (list "all" | |
719 | (string-append "PREFIX=" out) | |
720 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
721 | ;; There are no tests. | |
722 | #:tests? #f)) | |
24b03073 | 723 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
724 | (synopsis "Mupen64Plus SDL input plugin") |
725 | (description | |
726 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
727 | which is capable of accurately playing many games. This package contains the | |
728 | Z64 RSP processor plugin.") | |
729 | (license license:gpl2+))) | |
730 | ||
731 | (define-public mupen64plus-video-arachnoid | |
732 | (package | |
733 | (name "mupen64plus-video-arachnoid") | |
734 | (version "2.0.0") | |
735 | (source | |
736 | (origin | |
2074c8bf TGR |
737 | (method git-fetch) |
738 | (uri (git-reference | |
739 | (url "https://github.com/mupen64plus/mupen64plus-video-arachnoid.git") | |
740 | (commit version))) | |
741 | (file-name (git-file-name name version)) | |
9af704c5 | 742 | (sha256 |
2074c8bf | 743 | (base32 "1v9fqwpb6pawr8z5cm2ki7bqkks4iyr5c4jy4v5khj6h8zcv55gc")))) |
9af704c5 RH |
744 | (build-system gnu-build-system) |
745 | (native-inputs | |
746 | `(("pkg-config" ,pkg-config) | |
747 | ("which" ,which))) | |
748 | (inputs | |
749 | `(("mesa" ,mesa) | |
750 | ("mupen64plus-core" ,mupen64plus-core))) | |
751 | (arguments | |
752 | '(#:phases | |
753 | (modify-phases %standard-phases | |
754 | ;; The mupen64plus build system has no configure phase. | |
755 | (delete 'configure) | |
756 | ;; Makefile is in a subdirectory. | |
757 | (add-before | |
758 | 'build 'cd-to-project-dir | |
759 | (lambda _ | |
760 | (chdir "projects/unix")))) | |
761 | #:make-flags | |
762 | (let ((out (assoc-ref %outputs "out")) | |
763 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
764 | (list "all" | |
765 | (string-append "PREFIX=" out) | |
766 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
767 | ;; There are no tests. | |
768 | #:tests? #f)) | |
5daa2019 | 769 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
770 | (synopsis "Mupen64Plus Rice Video plugin") |
771 | (description | |
772 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
773 | which is capable of accurately playing many games. This package contains the | |
774 | Arachnoid video plugin.") | |
775 | (license license:gpl2+))) | |
776 | ||
777 | (define-public mupen64plus-video-glide64 | |
778 | (package | |
779 | (name "mupen64plus-video-glide64") | |
780 | (version "2.0.0") | |
781 | (source | |
782 | (origin | |
62536186 TGR |
783 | (method git-fetch) |
784 | (uri (git-reference | |
785 | (url "https://github.com/mupen64plus/mupen64plus-video-glide64.git") | |
786 | (commit version))) | |
787 | (file-name (git-file-name name version)) | |
9af704c5 | 788 | (sha256 |
62536186 | 789 | (base32 "0qn5za7g7796kh2ag3xpmhbqg0yf71g9liz6ks0rha8pz73lgs01")))) |
9af704c5 RH |
790 | (build-system gnu-build-system) |
791 | (native-inputs | |
792 | `(("pkg-config" ,pkg-config) | |
793 | ("which" ,which))) | |
794 | (inputs | |
795 | `(("mesa" ,mesa) | |
796 | ("mupen64plus-core" ,mupen64plus-core) | |
797 | ("sdl2" ,sdl2))) | |
798 | (arguments | |
799 | '(#:phases | |
800 | (modify-phases %standard-phases | |
801 | ;; The mupen64plus build system has no configure phase. | |
802 | (delete 'configure) | |
803 | ;; Makefile is in a subdirectory. | |
804 | (add-before | |
805 | 'build 'cd-to-project-dir | |
806 | (lambda _ | |
807 | (chdir "projects/unix"))) | |
808 | ;; XXX Should be unnecessary with the next release. | |
809 | (add-before | |
810 | 'build 'use-sdl2 | |
811 | (lambda _ | |
812 | (substitute* "Makefile" | |
813 | (("SDL_CONFIG = (.*)sdl-config" all prefix) | |
814 | (string-append "SDL_CONFIG = " prefix "sdl2-config")))))) | |
815 | #:make-flags | |
816 | (let ((out (assoc-ref %outputs "out")) | |
817 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
818 | (list "all" | |
819 | (string-append "PREFIX=" out) | |
820 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
821 | ;; There are no tests. | |
822 | #:tests? #f)) | |
d1e63866 | 823 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
824 | (synopsis "Mupen64Plus Rice Video plugin") |
825 | (description | |
826 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
827 | which is capable of accurately playing many games. This package contains the | |
828 | Glide64 video plugin.") | |
829 | (license license:gpl2+))) | |
830 | ||
831 | (define-public mupen64plus-video-glide64mk2 | |
832 | (package | |
833 | (name "mupen64plus-video-glide64mk2") | |
834 | (version "2.5") | |
835 | (source | |
836 | (origin | |
e5e7a167 TGR |
837 | (method git-fetch) |
838 | (uri (git-reference | |
839 | (url "https://github.com/mupen64plus/mupen64plus-video-glide64mk2.git") | |
840 | (commit version))) | |
841 | (file-name (git-file-name name version)) | |
9af704c5 | 842 | (sha256 |
e5e7a167 | 843 | (base32 "08pm28a36dpr0cvr8pzw0n5ksdazp7jqvlmqfy2lwb4dm0cwhkqd")))) |
9af704c5 RH |
844 | (build-system gnu-build-system) |
845 | (native-inputs | |
846 | `(("pkg-config" ,pkg-config) | |
847 | ("which" ,which))) | |
848 | (inputs | |
849 | `(("boost" ,boost) | |
850 | ("libpng" ,libpng) | |
851 | ("mesa" ,mesa) | |
852 | ("mupen64plus-core" ,mupen64plus-core) | |
853 | ("sdl2" ,sdl2) | |
854 | ("zlib" ,zlib))) | |
855 | (arguments | |
856 | '(#:phases | |
857 | (modify-phases %standard-phases | |
858 | ;; The mupen64plus build system has no configure phase. | |
859 | (delete 'configure) | |
860 | ;; Makefile is in a subdirectory. | |
861 | (add-before | |
862 | 'build 'cd-to-project-dir | |
863 | (lambda _ | |
864 | (chdir "projects/unix")))) | |
865 | #:make-flags | |
866 | (let ((out (assoc-ref %outputs "out")) | |
867 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
868 | (list "all" | |
869 | (string-append "PREFIX=" out) | |
870 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
871 | ;; There are no tests. | |
872 | #:tests? #f)) | |
84532c2b | 873 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
874 | (synopsis "Mupen64Plus Rice Video plugin") |
875 | (description | |
876 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
877 | which is capable of accurately playing many games. This package contains the | |
878 | Glide64MK2 video plugin.") | |
879 | (license license:gpl2+))) | |
880 | ||
881 | (define-public mupen64plus-video-rice | |
882 | (package | |
883 | (name "mupen64plus-video-rice") | |
884 | (version "2.5") | |
885 | (source | |
886 | (origin | |
d42d0a0b TGR |
887 | (method git-fetch) |
888 | (uri (git-reference | |
889 | (url "https://github.com/mupen64plus/mupen64plus-video-rice.git") | |
890 | (commit version))) | |
891 | (file-name (git-file-name name version)) | |
9af704c5 | 892 | (sha256 |
d42d0a0b | 893 | (base32 "0rpmbcq67gsj5h5jjis146378qc1mskskvx20y1ikx59yhbamh13")))) |
9af704c5 RH |
894 | (build-system gnu-build-system) |
895 | (native-inputs | |
896 | `(("pkg-config" ,pkg-config) | |
897 | ("which" ,which))) | |
898 | (inputs | |
899 | `(("libpng" ,libpng) | |
900 | ("mesa" ,mesa) | |
901 | ("mupen64plus-core" ,mupen64plus-core) | |
902 | ("sdl2" ,sdl2))) | |
903 | (arguments | |
904 | '(#:phases | |
905 | (modify-phases %standard-phases | |
906 | ;; The mupen64plus build system has no configure phase. | |
907 | (delete 'configure) | |
908 | ;; Makefile is in a subdirectory. | |
909 | (add-before | |
910 | 'build 'cd-to-project-dir | |
911 | (lambda _ | |
912 | (chdir "projects/unix")))) | |
913 | #:make-flags | |
914 | (let ((out (assoc-ref %outputs "out")) | |
915 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
916 | (list "all" | |
917 | (string-append "PREFIX=" out) | |
918 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
919 | ;; There are no tests. | |
920 | #:tests? #f)) | |
b21acd21 | 921 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
922 | (synopsis "Mupen64Plus Rice Video plugin") |
923 | (description | |
924 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
925 | which is capable of accurately playing many games. This package contains the | |
926 | Rice Video plugin.") | |
927 | (license license:gpl2+))) | |
928 | ||
929 | (define-public mupen64plus-video-z64 | |
930 | (package | |
931 | (name "mupen64plus-video-z64") | |
932 | (version "2.0.0") | |
933 | (source | |
934 | (origin | |
85baeb20 TGR |
935 | (method git-fetch) |
936 | (uri (git-reference | |
937 | (url "https://github.com/mupen64plus/mupen64plus-video-z64.git") | |
938 | (commit version))) | |
939 | (file-name (git-file-name name version)) | |
9af704c5 | 940 | (sha256 |
85baeb20 | 941 | (base32 "04qa2fdd6dakpk2v0d4l80xh9b4h8gm71g80c0wyyxdhmhwk1r9c")) |
fdb61400 | 942 | (patches (search-patches "mupen64plus-video-z64-glew-correct-path.patch")))) |
9af704c5 RH |
943 | (build-system gnu-build-system) |
944 | (native-inputs | |
945 | `(("pkg-config" ,pkg-config) | |
946 | ("which" ,which))) | |
947 | (inputs | |
948 | `(("glew" ,glew) | |
949 | ("mupen64plus-core" ,mupen64plus-core) | |
950 | ("sdl2" ,sdl2))) | |
951 | (arguments | |
952 | '(#:phases | |
953 | (modify-phases %standard-phases | |
954 | ;; The mupen64plus build system has no configure phase. | |
955 | (delete 'configure) | |
956 | ;; Makefile is in a subdirectory. | |
957 | (add-before | |
958 | 'build 'cd-to-project-dir | |
959 | (lambda _ | |
960 | (chdir "projects/unix"))) | |
961 | ;; XXX Should be unnecessary with the next release. | |
962 | (add-before | |
963 | 'build 'use-sdl2 | |
964 | (lambda _ | |
965 | (substitute* "Makefile" | |
966 | (("SDL_CONFIG = (.*)sdl-config" all prefix) | |
967 | (string-append "SDL_CONFIG = " prefix "sdl2-config")))))) | |
968 | #:make-flags | |
969 | (let ((out (assoc-ref %outputs "out")) | |
970 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
971 | (list "all" | |
972 | (string-append "PREFIX=" out) | |
973 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
974 | ;; There are no tests. | |
975 | #:tests? #f)) | |
26daadb9 | 976 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
977 | (synopsis "Mupen64Plus Z64 video plugin") |
978 | (description | |
979 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
980 | which is capable of accurately playing many games. This package contains the | |
981 | Z64 video plugin.") | |
982 | (license license:gpl2+))) | |
983 | ||
984 | (define-public mupen64plus-ui-console | |
985 | (package | |
986 | (name "mupen64plus-ui-console") | |
987 | (version "2.5") | |
988 | (source | |
989 | (origin | |
225157a0 TGR |
990 | (method git-fetch) |
991 | (uri (git-reference | |
992 | (url "https://github.com/mupen64plus/mupen64plus-ui-console.git") | |
993 | (commit version))) | |
994 | (file-name (git-file-name name version)) | |
9af704c5 | 995 | (sha256 |
225157a0 | 996 | (base32 "0vrf98qa6a0y3647kslsv644fag233dxh5dcr1yncjiiwickcr5a")) |
9af704c5 RH |
997 | (patches (search-patches "mupen64plus-ui-console-notice.patch")))) |
998 | (build-system gnu-build-system) | |
999 | (native-inputs | |
1000 | `(("pkg-config" ,pkg-config) | |
1001 | ("which" ,which))) | |
1002 | (inputs | |
1003 | `(("sdl2" ,sdl2))) | |
1004 | ;; Mupen64Plus supports a single data directory and a single plugin | |
1005 | ;; directory in its configuration, yet we need data and plugin files from | |
1006 | ;; a variety of packages. The best way to deal with this is to install | |
1007 | ;; all packages from which data and plugin files are needed into one's | |
1008 | ;; profile, and point the configuration there. Hence, propagate the most | |
1009 | ;; important packages here to save the user from the bother. The patch | |
1010 | ;; mupen64plus-ui-console-notice also gives users instructions on what | |
1011 | ;; they need to do in order to point the configuration to their profile. | |
1012 | (propagated-inputs | |
1013 | `(("mupen64plus-core" ,mupen64plus-core) | |
1014 | ("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl) | |
1015 | ("mupen64plus-input-sdl" ,mupen64plus-input-sdl) | |
1016 | ("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle) | |
1017 | ("mupen64plus-video-glide64" ,mupen64plus-video-glide64) | |
1018 | ("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2) | |
1019 | ("mupen64plus-video-rice" ,mupen64plus-video-rice))) | |
1020 | (arguments | |
1021 | '(#:phases | |
1022 | (modify-phases %standard-phases | |
1023 | ;; The mupen64plus build system has no configure phase. | |
1024 | (delete 'configure) | |
1025 | ;; Makefile is in a subdirectory. | |
1026 | (add-before | |
1027 | 'build 'cd-to-project-dir | |
1028 | (lambda _ | |
1029 | (chdir "projects/unix")))) | |
1030 | #:make-flags | |
1031 | (let ((out (assoc-ref %outputs "out")) | |
1032 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
1033 | (list "all" | |
1034 | (string-append "PREFIX=" out) | |
1035 | (string-append "APIDIR=" m64p "/include/mupen64plus") | |
1036 | ;; Trailing slash matters here. | |
1037 | (string-append "COREDIR=" m64p "/lib/"))) | |
1038 | ;; There are no tests. | |
1039 | #:tests? #f)) | |
e8079ba4 | 1040 | (home-page "https://www.mupen64plus.org/") |
ff452bea | 1041 | (synopsis "Mupen64Plus command line user interface") |
9af704c5 RH |
1042 | (description |
1043 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
1044 | which is capable of accurately playing many games. This package contains the | |
1045 | command line user interface. Installing this package is the easiest way | |
1046 | towards a working Mupen64Plus for casual users.") | |
1047 | (license license:gpl2+))) | |
1048 | ||
1049 | (define-public nestopia-ue | |
1050 | (package | |
1051 | (name "nestopia-ue") | |
9d39c300 | 1052 | (version "1.48") |
3e461b71 TGR |
1053 | (source |
1054 | (origin | |
1055 | (method git-fetch) | |
1056 | (uri (git-reference | |
1057 | (url "https://github.com/rdanbrook/nestopia.git") | |
1058 | (commit version))) | |
1059 | (file-name (git-file-name name version)) | |
1060 | (sha256 | |
1061 | (base32 "19c8vx5yxbysl0sszk5blfngwacshdgwbf44g1qaxvq8ywiyxmb4")) | |
1062 | (modules '((guix build utils))) | |
1063 | (snippet | |
1064 | '(begin | |
1065 | ;; We don't need libretro for the GNU/Linux build. | |
1066 | (delete-file-recursively "libretro") | |
1067 | #t)))) | |
9d39c300 | 1068 | (build-system cmake-build-system) |
9af704c5 RH |
1069 | (native-inputs |
1070 | `(("pkg-config" ,pkg-config))) | |
1071 | (inputs | |
1072 | `(("ao" ,ao) | |
9af704c5 RH |
1073 | ("gtk+" ,gtk+) |
1074 | ("libarchive" ,libarchive) | |
9d39c300 | 1075 | ("libepoxy" ,libepoxy) |
9af704c5 RH |
1076 | ("sdl2" ,sdl2) |
1077 | ("zlib" ,zlib))) | |
1078 | (arguments | |
1079 | '(#:phases | |
1080 | (modify-phases %standard-phases | |
9d39c300 KK |
1081 | ;; This fixes the file chooser crash that happens with GTK 3. |
1082 | (add-after 'install 'wrap-program | |
1083 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1084 | (let* ((out (assoc-ref outputs "out")) | |
1085 | (nestopia (string-append out "/bin/nestopia")) | |
1086 | (gtk (assoc-ref inputs "gtk+")) | |
1087 | (gtk-share (string-append gtk "/share"))) | |
1088 | (wrap-program nestopia | |
1089 | `("XDG_DATA_DIRS" ":" prefix (,gtk-share))))))) | |
9af704c5 RH |
1090 | ;; There are no tests. |
1091 | #:tests? #f)) | |
1092 | (home-page "http://0ldsk00l.ca/nestopia/") | |
1093 | (synopsis "Nintendo Entertainment System (NES/Famicom) emulator") | |
1094 | (description | |
1095 | "Nestopia UE (Undead Edition) is a fork of the Nintendo Entertainment | |
1096 | System (NES/Famicom) emulator Nestopia, with enhancements from members of the | |
1097 | emulation community. It provides highly accurate emulation.") | |
1098 | (license license:gpl2+))) | |
1099 | ||
1100 | (define-public retroarch | |
1101 | (package | |
1102 | (name "retroarch") | |
bd671624 | 1103 | (version "1.8.1") |
9af704c5 RH |
1104 | (source |
1105 | (origin | |
1fc346de TGR |
1106 | (method git-fetch) |
1107 | (uri (git-reference | |
1108 | (url "https://github.com/libretro/RetroArch.git") | |
1109 | (commit (string-append "v" version)))) | |
1110 | (file-name (git-file-name name version)) | |
9af704c5 | 1111 | (sha256 |
77549754 TGR |
1112 | (base32 "0y7rcpz7psf8k3agsrq277jdm651vbnn9xpqvmj2in1a786idya7")) |
1113 | (patches | |
1114 | (search-patches "retroarch-disable-online-updater.patch")) | |
1115 | (modules '((guix build utils))) | |
1116 | (snippet | |
1117 | '(begin | |
1118 | ;; Don't suggest using the Online Updater if available: it never | |
1119 | ;; is. This disables translation of this particular message. | |
1120 | (substitute* (find-files "menu/drivers" "\\.c$") | |
1121 | (("msg_hash_to_str\\(MSG_MISSING_ASSETS\\)") | |
1122 | "\"Warning: Missing assets, go get some\"")) | |
1123 | #t)))) | |
9af704c5 RH |
1124 | (build-system gnu-build-system) |
1125 | (arguments | |
f21967a4 | 1126 | `(#:tests? #f ; no tests |
9af704c5 RH |
1127 | #:phases |
1128 | (modify-phases %standard-phases | |
1129 | (replace 'configure | |
1130 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1131 | (let* ((out (assoc-ref outputs "out")) | |
1132 | (etc (string-append out "/etc")) | |
12a3abc6 RH |
1133 | (vulkan (assoc-ref inputs "vulkan-loader")) |
1134 | (wayland-protocols (assoc-ref inputs "wayland-protocols"))) | |
77549754 | 1135 | ;; Hard-code some store file names. |
9af704c5 RH |
1136 | (substitute* "gfx/common/vulkan_common.c" |
1137 | (("libvulkan.so") (string-append vulkan "/lib/libvulkan.so"))) | |
12a3abc6 RH |
1138 | (substitute* "gfx/common/wayland/generate_wayland_protos.sh" |
1139 | (("/usr/local/share/wayland-protocols") | |
1140 | (string-append wayland-protocols "/share/wayland-protocols"))) | |
9af704c5 RH |
1141 | (substitute* "qb/qb.libs.sh" |
1142 | (("/bin/true") (which "true"))) | |
77549754 | 1143 | |
fade67ab EF |
1144 | ;; Use shared zlib. |
1145 | (substitute* '("libretro-common/file/archive_file_zlib.c" | |
e85bb00c | 1146 | "libretro-common/streams/trans_stream_zlib.c") |
fade67ab | 1147 | (("<compat/zlib.h>") "<zlib.h>")) |
77549754 | 1148 | |
9af704c5 RH |
1149 | ;; The configure script does not yet accept the extra arguments |
1150 | ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase. | |
f21967a4 EF |
1151 | (invoke |
1152 | "./configure" | |
1153 | ,@(if (string-prefix? "armhf" (or (%current-target-system) | |
1154 | (%current-system))) | |
1155 | '("--enable-neon" "--enable-floathard") | |
1156 | '()) | |
1157 | (string-append "--prefix=" out) | |
73dd0654 TGR |
1158 | (string-append "--global-config-dir=" etc) |
1159 | "--disable-builtinminiupnpc"))))))) | |
9af704c5 RH |
1160 | (inputs |
1161 | `(("alsa-lib" ,alsa-lib) | |
1162 | ("ffmpeg" ,ffmpeg) | |
1163 | ("freetype" ,freetype) | |
1164 | ("libxinerama" ,libxinerama) | |
1165 | ("libxkbcommon" ,libxkbcommon) | |
1166 | ("libxml2" ,libxml2) | |
45267af1 | 1167 | ("libxrandr" ,libxrandr) |
9af704c5 RH |
1168 | ("libxv" ,libxv) |
1169 | ("mesa" ,mesa) | |
73dd0654 | 1170 | ("miniupnpc" ,miniupnpc) |
9af704c5 RH |
1171 | ("openal" ,openal) |
1172 | ("pulseaudio" ,pulseaudio) | |
1173 | ("python" ,python) | |
76b7d8fd | 1174 | ("qtbase" ,qtbase) |
9af704c5 RH |
1175 | ("sdl" ,sdl2) |
1176 | ("udev" ,eudev) | |
e6fcf903 | 1177 | ("vulkan-loader" ,vulkan-loader) |
c695fb76 | 1178 | ("wayland" ,wayland) |
9af704c5 RH |
1179 | ("zlib" ,zlib))) |
1180 | (native-inputs | |
1181 | `(("pkg-config" ,pkg-config) | |
12a3abc6 | 1182 | ("wayland-protocols" ,wayland-protocols) |
9af704c5 RH |
1183 | ("which" ,which))) |
1184 | (home-page "https://www.libretro.com/") | |
1185 | (synopsis "Reference frontend for the libretro API") | |
1186 | (description | |
1187 | "Libretro is a simple but powerful development interface that allows for | |
1188 | the easy creation of emulators, games and multimedia applications that can plug | |
1189 | straight into any libretro-compatible frontend. RetroArch is the official | |
1190 | reference frontend for the libretro API, currently used by most as a modular | |
1191 | multi-system game/emulator system.") | |
1192 | (license license:gpl3+))) | |
4c40ed9d NG |
1193 | |
1194 | (define-public scummvm | |
1195 | (package | |
1196 | (name "scummvm") | |
2d4b2488 | 1197 | (version "2.1.1") |
4c40ed9d NG |
1198 | (source |
1199 | (origin | |
1200 | (method url-fetch) | |
1201 | (uri (string-append "http://www.scummvm.org/frs/scummvm/" version | |
1202 | "/scummvm-" version ".tar.xz")) | |
1203 | (sha256 | |
2d4b2488 | 1204 | (base32 "1a6waf1ybp91nwva8g650cljlfb1di4l0jv13vg6yfgkas9pclsp")))) |
4c40ed9d NG |
1205 | (build-system gnu-build-system) |
1206 | (arguments | |
6177b14b | 1207 | `(#:tests? #f ;require "git" |
4c40ed9d NG |
1208 | #:configure-flags (list "--enable-release") ;for optimizations |
1209 | #:phases | |
1210 | (modify-phases %standard-phases | |
161b297b NG |
1211 | (add-after 'unpack 'fix-build |
1212 | ;; XXX: The following works around a build failure introduced when | |
1213 | ;; Fluidsynth was updated to version 2.1. It has been applied | |
1214 | ;; upstream as 68758a879e0c8ecc0d40962516d4e808aa4e15e5 and can be | |
2d4b2488 | 1215 | ;; removed once this commit makes it into a release. |
161b297b NG |
1216 | (lambda _ |
1217 | (substitute* "audio/softsynth/fluidsynth.cpp" | |
1218 | (("#include <fluidsynth.h>") "") | |
1219 | (("#include \"common/scummsys.h\"") "#include \"config.h\"") | |
1220 | (("#include \"common/config-manager.h\"" line) | |
1221 | (string-append "#include <fluidsynth.h>\n" | |
1222 | "#include \"common/scummsys.h\"\n" | |
1223 | line))) | |
1224 | #t)) | |
4c40ed9d NG |
1225 | (replace 'configure |
1226 | ;; configure does not work followed by both "SHELL=..." and | |
1227 | ;; "CONFIG_SHELL=..."; set environment variables instead | |
1228 | (lambda* (#:key outputs configure-flags #:allow-other-keys) | |
1229 | (let* ((out (assoc-ref outputs "out")) | |
1230 | (bash (which "bash")) | |
1231 | (flags `(,(string-append "--prefix=" out) | |
1232 | ,@configure-flags))) | |
1233 | (setenv "SHELL" bash) | |
1234 | (setenv "CONFIG_SHELL" bash) | |
1235 | (apply invoke "./configure" flags))))))) | |
1236 | (native-inputs | |
64e9d128 NG |
1237 | `(("nasm" ,nasm) |
1238 | ("pkg-config" ,pkg-config))) | |
4c40ed9d NG |
1239 | (inputs |
1240 | `(("alsa-lib" ,alsa-lib) | |
1241 | ("faad2" ,faad2) | |
1242 | ("fluidsynth" ,fluidsynth) | |
1243 | ("freetype" ,freetype) | |
6177b14b | 1244 | ("liba52" ,liba52) |
4c40ed9d NG |
1245 | ("libflac" ,flac) |
1246 | ("libjpeg-turbo" ,libjpeg-turbo) | |
1247 | ("libmad" ,libmad) | |
1248 | ("libmpeg2" ,libmpeg2) | |
1249 | ("libogg" ,libogg) | |
1250 | ("libpng" ,libpng) | |
1251 | ("libtheora" ,libtheora) | |
1252 | ("libvorbis" ,libvorbis) | |
6177b14b | 1253 | ("sdl2" ,(sdl-union (list sdl2 sdl2-net))) |
4c40ed9d NG |
1254 | ("zlib" ,zlib))) |
1255 | (home-page "https://www.scummvm.org/") | |
1256 | (synopsis "Engine for several graphical adventure games") | |
1257 | (description "ScummVM is a program which allows you to run certain | |
1258 | classic graphical point-and-click adventure games, provided you | |
1259 | already have their data files. The clever part about this: ScummVM | |
1260 | just replaces the executables shipped with the games, allowing you to | |
1261 | play them on systems for which they were never designed!") | |
1262 | (license license:gpl2+))) | |
c8b2fd28 NG |
1263 | |
1264 | (define-public mame | |
1265 | (package | |
1266 | (name "mame") | |
0b15c110 | 1267 | (version "0.218") |
c8b2fd28 NG |
1268 | (source |
1269 | (origin | |
1270 | (method git-fetch) | |
1271 | (uri (git-reference | |
1272 | (url "https://github.com/mamedev/mame.git") | |
1273 | (commit (apply string-append "mame" (string-split version #\.))))) | |
1274 | (file-name (git-file-name name version)) | |
1275 | (sha256 | |
0b15c110 | 1276 | (base32 "1c43hqfabc7spkyk5ma4bjdb0yqm93sdg5g13ka8mvi462snrfd7")) |
c8b2fd28 NG |
1277 | (modules '((guix build utils))) |
1278 | (snippet | |
1279 | ;; Remove bundled libraries. | |
1280 | '(begin | |
1281 | (with-directory-excursion "3rdparty" | |
1282 | (for-each delete-file-recursively | |
1283 | '("asio" "expat" "glm" "libflac" "libjpeg" "lua" | |
1284 | "portaudio" "portmidi" "pugixml" "rapidjson" "SDL2" | |
1285 | "SDL2-override" "sqlite3" "utf8proc" "zlib"))) | |
1286 | #t)))) | |
1287 | (build-system gnu-build-system) | |
1288 | (arguments | |
1289 | `(#:make-flags | |
1290 | (cons* | |
430e1528 NG |
1291 | ;; A 'strict-overflow' error pops up on i686 so disable '-Werror'. |
1292 | "NOWERROR=1" | |
c8b2fd28 NG |
1293 | (string-append "QT_HOME=" (assoc-ref %build-inputs "qtbase")) |
1294 | (string-append "SDL_INI_PATH=" | |
1295 | (assoc-ref %outputs "out") | |
1296 | "/share/mame/ini") | |
1297 | (map (lambda (lib) | |
1298 | (string-append "USE_SYSTEM_LIB_" (string-upcase lib) "=1")) | |
1299 | '("asio" "expat" "flac" "glm" "jpeg" "lua" "portaudio" "portmidi" | |
1300 | "pugixml" "rapidjson" "sqlite3" "utf8proc" "zlib"))) | |
1301 | #:tests? #f ;no test in regular release | |
1302 | #:phases | |
1303 | (modify-phases %standard-phases | |
1304 | (delete 'configure) | |
1305 | (add-after 'build 'build-documentation | |
1306 | (lambda _ (invoke "make" "-C" "docs" "man" "info"))) | |
1307 | (replace 'install | |
1308 | ;; Upstream does not provide an installation phase. | |
1309 | (lambda* (#:key outputs #:allow-other-keys) | |
1310 | (let* ((out (assoc-ref outputs "out")) | |
1311 | (share (string-append out "/share/mame"))) | |
1312 | ;; Install data. | |
1313 | (for-each (lambda (dir) | |
1314 | (copy-recursively dir (string-append share "/" dir))) | |
1315 | '("artwork" "bgfx" "ctrlr" "hash" "ini" "language" | |
1316 | "plugins" "samples")) | |
1317 | (let ((keymaps (string-append share "/keymaps"))) | |
1318 | (for-each (lambda (file) (install-file file keymaps)) | |
1319 | (find-files "keymaps" ".*LINUX\\.map"))) | |
1320 | (let ((fonts (string-append share "/fonts"))) | |
1321 | (install-file "uismall.bdf" fonts)) | |
6921e95a EF |
1322 | (when (file-exists? "mame64") |
1323 | (rename-file "mame64" "mame")) | |
c8b2fd28 NG |
1324 | (install-file "mame" (string-append out "/bin"))) |
1325 | #t)) | |
1326 | (add-after 'install 'install-documentation | |
1327 | (lambda* (#:key outputs #:allow-other-keys) | |
1328 | (let* ((out (assoc-ref outputs "out")) | |
1329 | (man (string-append out "/share/man/man1")) | |
1330 | (info (string-append out "/share/info"))) | |
1331 | (install-file "docs/build/man/MAME.1" man) | |
1332 | (install-file "docs/build/texinfo/MAME.info" info)) | |
1333 | #t)) | |
1334 | (add-after 'install 'install-ini-file | |
1335 | ;; Generate an ini file so as to set some directories (e.g., roms) | |
1336 | ;; to a writable location, i.e., "$HOME/.mame/" and "$HOME/mame/". | |
1337 | ;; | |
1338 | ;; XXX: We need to insert absolute references to the store. It can | |
1339 | ;; be an issue if they leak into user's home directory, e.g., with | |
1340 | ;; "mame -createconfig" and the package is later GC'ed. | |
1341 | (lambda* (#:key outputs #:allow-other-keys) | |
1342 | (let* ((out (assoc-ref outputs "out")) | |
1343 | (share (string-append out "/share/mame")) | |
1344 | (ini (string-append share "/ini"))) | |
1345 | (with-output-to-file (string-append ini "/mame.ini") | |
1346 | (lambda _ | |
1347 | (format #t | |
1348 | "inipath $HOME/.mame;~a/ini~@ | |
1349 | homepath $HOME/mame~@ | |
1350 | rompath $HOME/mame/roms~@ | |
1351 | samplepath $HOME/mame/samples;~a/samples~@ | |
1352 | cheatpath $HOME/mame/cheat~@ | |
1353 | artpath $HOME/mame/artwork;~a/artwork~@ | |
1354 | crosshairpath $HOME/mame/crosshair~@ | |
1355 | snapshot_directory $HOME/mame/snapshots~@ | |
1356 | hashpath ~a/hash~@ | |
1357 | fontpath $HOME/mame/fonts;~a/fonts~@ | |
1358 | ctrlrpath $HOME/mame/ctrlr;~a/ctrlr~@ | |
1359 | bgfx_path ~a/bgfx~@ | |
1360 | pluginspath $HOME/mame/plugins;~a/plugins~@ | |
1361 | languagepath ~a/language~@ | |
1362 | cfg_directory $HOME/.mame/cfg~@ | |
1363 | nvram_directory $HOME/.mame/nvram~@ | |
1364 | input_directory $HOME/.mame/inp~@ | |
1365 | state_directory $HOME/.mame/sta~@ | |
1366 | diff_directory $HOME/.mame/diff~@ | |
1367 | comment_directory $HOME/.mame/comments~%" | |
1368 | share share share share share share share share | |
1369 | share))) | |
1370 | (with-output-to-file (string-append ini "/ui.ini") | |
1371 | (lambda _ | |
1372 | (format #t | |
1373 | "historypath $HOME/mame/history~@ | |
1374 | categorypath $HOME/mame/folders~@ | |
1375 | cabinets_directory $HOME/mame/cabinets~@ | |
1376 | cpanels_directory $HOME/mame/cpanel~@ | |
1377 | pcbs_directory $HOME/mame/pcb~@ | |
1378 | flyers_directory $HOME/mame/flyers~@ | |
1379 | titles_directory $HOME/mame/titles~@ | |
1380 | ends_directory $HOME/mame/ends~@ | |
1381 | marquees_directory $HOME/mame/marquees~@ | |
1382 | artwork_preview_directory $HOME/mame/artpreview~@ | |
1383 | bosses_directory $HOME/mame/bosses~@ | |
1384 | logos_directory $HOME/mame/logo~@ | |
1385 | scores_directory $HOME/mame/scores~@ | |
1386 | versus_directory $HOME/mame/versus~@ | |
1387 | gameover_directory $HOME/mame/gameover~@ | |
1388 | howto_directory $HOME/mame/howto~@ | |
1389 | select_directory $HOME/mame/select~@ | |
1390 | icons_directory $HOME/mame/icons~@ | |
1391 | covers_directory $HOME/mame/covers~@ | |
1392 | ui_path $HOME/.mame/ui~%"))) | |
1393 | #t))) | |
1394 | (add-after 'install 'install-desktop-file | |
1395 | (lambda* (#:key outputs #:allow-other-keys) | |
1396 | (let* ((out (assoc-ref outputs "out")) | |
1397 | (desktop (string-append out "/share/applications")) | |
1398 | (executable (string-append out "/bin/mame"))) | |
1399 | (mkdir-p desktop) | |
1400 | (with-output-to-file (string-append desktop "/mame.desktop") | |
1401 | (lambda _ | |
1402 | (format #t | |
1403 | "[Desktop Entry]~@ | |
1404 | Name=mame~@ | |
1405 | Comment=Multi-purpose emulation framework~@ | |
1406 | Exec=~a~@ | |
1407 | TryExec=~@*~a~@ | |
1408 | Terminal=false~@ | |
1409 | Type=Application~@ | |
1410 | Categories=Game;Emulator;~@ | |
1411 | Keywords=Game;Emulator;Arcade;~%" | |
1412 | executable))) | |
1413 | #t)))))) | |
1414 | (native-inputs | |
1415 | `(("pkg-config" ,pkg-config) | |
03370346 NG |
1416 | ("sphinx" ,python-sphinx) |
1417 | ("sphinxcontrib-svg2pdfconverter" ,python-sphinxcontrib-svg2pdfconverter) | |
c8b2fd28 NG |
1418 | ("texinfo" ,texinfo))) |
1419 | (inputs | |
1420 | `(("alsa-lib" ,alsa-lib) | |
1421 | ("asio" ,asio) | |
1422 | ("expat" ,expat) | |
1423 | ("flac" ,flac) | |
1424 | ("fontconfig" ,fontconfig) | |
1425 | ("glm" ,glm) | |
7b24b76b | 1426 | ("libjpeg" ,libjpeg-turbo) |
9f0650df | 1427 | ("libxi" ,libxi) |
c8b2fd28 NG |
1428 | ("libxinerama" ,libxinerama) |
1429 | ("lua" ,lua) | |
1430 | ("portaudio" ,portaudio) | |
1431 | ("portmidi" ,portmidi) | |
63247277 | 1432 | ("pugixml" ,pugixml) |
c8b2fd28 NG |
1433 | ("python-wrapper" ,python-wrapper) |
1434 | ("qtbase" ,qtbase) | |
1435 | ("rapidjson" ,rapidjson) | |
1436 | ("sdl" ,(sdl-union (list sdl2 sdl2-ttf))) | |
1437 | ("sqlite" ,sqlite) | |
1438 | ("utf8proc" ,utf8proc) | |
1439 | ("zlib" ,zlib))) | |
1440 | (home-page "http://mamedev.org/") | |
1441 | (synopsis "Multi-purpose emulation framework") | |
1442 | (description "MAME's purpose is to preserve decades of software | |
1443 | history. As electronic technology continues to rush forward, MAME | |
1444 | prevents this important @emph{vintage} software from being lost and | |
1445 | forgotten. This is achieved by documenting the hardware and how it | |
1446 | functions. The source code to MAME serves as this documentation.") | |
1447 | ;; The MAME project as a whole is distributed under the terms of GPL2+. | |
1448 | ;; However, over 90% of the files are under Expat license. Also, artwork, | |
1449 | ;; keymaps, languages and samples are under CC0. | |
1450 | (license (list license:gpl2+ license:expat license:cc0)))) | |
1403e1f7 PN |
1451 | |
1452 | (define-public pcsxr | |
1453 | ;; No release since 2017. | |
1454 | (let ((commit "6484236cb0281e8040ff6c8078c87899a3407534")) | |
1455 | (package | |
1456 | (name "pcsxr") | |
1457 | ;; Version is tagged here: https://github.com/frealgagu/PCSX-Reloaded | |
1458 | (version "1.9.95") | |
1459 | (source | |
1460 | (origin | |
1461 | (method git-fetch) | |
1462 | (uri (git-reference | |
1463 | (url "https://github.com/pcsxr/PCSX-Reloaded") | |
1464 | (commit commit))) | |
1465 | (sha256 | |
1466 | (base32 | |
1467 | "138mayp7zi9v4l3lm5f6xxkds619w1fgg769zm8s45c84jbz7dza")) | |
1468 | (file-name (git-file-name name commit)))) | |
1469 | (build-system cmake-build-system) | |
1470 | (arguments | |
1471 | `(#:tests? #f ;no "test" target | |
1472 | #:configure-flags | |
1473 | (list "-DSND_BACKEND=pulse" | |
1474 | "-DENABLE_CCDDA='ON'" | |
1475 | "-DUSE_LIBARCHIVE='ON'" | |
1476 | "-DUSE_LIBCDIO='ON'") | |
1477 | #:phases | |
1478 | (modify-phases %standard-phases | |
1479 | (add-after 'unpack 'cd-subdir | |
1ef71f52 | 1480 | (lambda _ (chdir "pcsxr") #t)) |
1403e1f7 PN |
1481 | (add-before 'configure 'fix-cdio-lookup |
1482 | (lambda* (#:key inputs #:allow-other-keys) | |
1483 | (substitute* "cmake/FindCdio.cmake" | |
1484 | (("/usr/include/cdio") | |
1ef71f52 KK |
1485 | (string-append (assoc-ref inputs "libcdio") "/include/cdio"))) |
1486 | #t)) | |
1487 | (add-after 'install 'wrap-program | |
1488 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1489 | (wrap-program (string-append (assoc-ref outputs "out") | |
1490 | "/bin/pcsxr") | |
1491 | ;; For GtkFileChooserDialog. | |
1492 | `("GSETTINGS_SCHEMA_DIR" = | |
1493 | (,(string-append (assoc-ref inputs "gtk+") | |
1494 | "/share/glib-2.0/schemas")))) | |
1495 | #t))))) | |
1403e1f7 PN |
1496 | (native-inputs |
1497 | `(("pkg-config" ,pkg-config) | |
1498 | ("intltool" ,intltool) | |
1499 | ("glib" ,glib "bin"))) | |
1500 | (inputs | |
1501 | `(("libcdio" ,libcdio) | |
1502 | ("sdl2" ,sdl2) | |
1503 | ("gtk+" ,gtk+) | |
1504 | ("ffmpeg" ,ffmpeg) | |
1505 | ("libxv" ,libxv) | |
1506 | ("libarchive" ,libarchive) | |
1507 | ("pulseaudio" ,pulseaudio))) | |
1508 | (home-page "https://archive.codeplex.com/?p=pcsxr") | |
1509 | (synopsis "PlayStation emulator") | |
1510 | (description | |
1511 | "A PlayStation emulator based on PCSX-df Project with bugfixes and | |
1512 | improvements.") | |
1513 | (license license:gpl2+)))) | |
f6a0be2f DW |
1514 | |
1515 | (define-public gens-gs | |
1516 | (package | |
1517 | (name "gens-gs") | |
1518 | (version "7") | |
1519 | (source | |
1520 | (origin | |
1521 | (method url-fetch) | |
1522 | (uri (string-append "https://retrocdn.net/images/6/6d/Gens-gs-r" | |
1523 | version ".tar.gz")) | |
1524 | (sha256 | |
1525 | (base32 | |
1526 | "1ha5s6d3y7s9aq9f4zmn9p88109c3mrj36z2w68jhiw5xrxws833")))) | |
1527 | (build-system glib-or-gtk-build-system) | |
1528 | (arguments | |
1529 | `(#:system "i686-linux" | |
1530 | #:phases | |
1531 | (modify-phases %standard-phases | |
1532 | (add-after 'unpack 'fix-CFLAGS | |
1533 | (lambda* _ | |
1534 | ;; Remove GTK API deprecation flags that cause build errors. | |
1535 | (substitute* "configure" | |
1536 | (("GTK_CFLAGS=\"\\$GTK_CFLAGS .*\"") "")) | |
1537 | #t))))) | |
1538 | (native-inputs | |
1539 | `(("pkg-config" ,pkg-config) | |
1540 | ("nasm" ,nasm))) | |
1541 | (inputs | |
1542 | `(("sdl" ,sdl) | |
1543 | ("gtk" ,gtk+-2))) | |
1544 | (home-page "https://segaretro.org/Gens/GS") | |
1545 | (synopsis "Emulator for Sega Genesis/Mega Drive systems") | |
1546 | (description | |
1547 | "Gens/GS is an emulator for the Mega Drive (also known as Sega Genesis), | |
1548 | derived from Gens. Project goals include clean source code, combined features | |
1549 | from various forks of Gens, and improved platform portability.") | |
1550 | (supported-systems '("i686-linux" "x86_64-linux")) | |
1551 | (license license:gpl2+))) |