gnu: Fix common unquote typos.
[jackhill/guix/guix.git] / gnu / packages / emulators.scm
1 ;;; GNU Guix --- Functional package management for GNU
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>
8 ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2017 Nicolas Goaziou <mail@nicolasgoaziou.fr>
10 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages emulators)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix svn-download)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages algebra)
36 #:use-module (gnu packages audio)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages boost)
40 #:use-module (gnu packages backup)
41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages curl)
43 #:use-module (gnu packages databases)
44 #:use-module (gnu packages fonts)
45 #:use-module (gnu packages fontutils)
46 #:use-module (gnu packages freedesktop)
47 #:use-module (gnu packages game-development)
48 #:use-module (gnu packages gettext)
49 #:use-module (gnu packages gl)
50 #:use-module (gnu packages glib)
51 #:use-module (gnu packages gtk)
52 #:use-module (gnu packages image)
53 #:use-module (gnu packages imagemagick)
54 #:use-module (gnu packages libedit)
55 #:use-module (gnu packages libusb)
56 #:use-module (gnu packages linux)
57 #:use-module (gnu packages ncurses)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages pulseaudio)
60 #:use-module (gnu packages python)
61 #:use-module (gnu packages qt)
62 #:use-module (gnu packages sdl)
63 #:use-module (gnu packages tls)
64 #:use-module (gnu packages upnp)
65 #:use-module (gnu packages video)
66 #:use-module (gnu packages vulkan)
67 #:use-module (gnu packages wxwidgets)
68 #:use-module (gnu packages xdisorg)
69 #:use-module (gnu packages xiph)
70 #:use-module (gnu packages xml)
71 #:use-module (gnu packages xorg)
72 #:use-module (guix build-system cmake)
73 #:use-module (guix build-system gnu))
74
75 (define-public desmume
76 (package
77 (name "desmume")
78 (version "0.9.11")
79 (source
80 (origin
81 (method url-fetch)
82 (uri (string-append
83 "mirror://sourceforge/desmume/desmume/"
84 version "/desmume-" version ".tar.gz"))
85 (sha256
86 (base32
87 "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs"))))
88 (build-system gnu-build-system)
89 (arguments
90 ;; Enable support for WiFi and microphone.
91 `(#:configure-flags '("--enable-wifi"
92 "--enable-openal")))
93 (native-inputs
94 `(("pkg-config" ,pkg-config)
95 ("intltool" ,intltool)))
96 (inputs
97 `(("zlib" ,zlib)
98 ("sdl" ,sdl)
99 ("glib" ,glib)
100 ("gtk+" ,gtk+-2)
101 ("glu" ,glu)))
102 (home-page "http://desmume.org/")
103 (synopsis "Nintendo DS emulator")
104 (description
105 "DeSmuME is an emulator for the Nintendo DS handheld gaming console.")
106 (license license:gpl2)))
107
108 ;; Building from recent Git because the official 5.0 release no longer builds.
109 (define-public dolphin-emu
110 (let ((commit "d04b179111f8d863f360839474cb82c766f762b8")
111 (revision "0"))
112 (package
113 (name "dolphin-emu")
114 (version (git-version "5.0" revision commit))
115 (source
116 (origin
117 (method git-fetch)
118 (uri (git-reference
119 (url "https://github.com/dolphin-emu/dolphin.git")
120 (commit commit)))
121 (file-name (git-file-name name version))
122 (modules '((guix build utils)))
123 (snippet
124 '(begin
125 ;; Remove external stuff we don't need.
126 (for-each (lambda (dir)
127 (delete-file-recursively
128 (string-append "Externals/" dir)))
129 '("LZO" "OpenAL" "Qt" "SFML" "SOIL" "curl" "ffmpeg"
130 "gettext" "hidapi" "libpng" "libusb" "mbedtls"
131 "miniupnpc" "wxWidgets3" "zlib"))
132 ;; Clean up source.
133 (for-each delete-file (find-files "." ".*\\.(bin|dsy|exe|jar|rar)$"))
134 #t))
135 (sha256
136 (base32
137 "0g725wmhlim73zrhi47wmr1bmplpy4b7sbimd5pm8xpfhj5nm10l"))))
138 (build-system cmake-build-system)
139 (arguments
140 '(#:tests? #f
141 ;; The FindGTK2 cmake script only checks hardcoded directories for
142 ;; glib/gtk headers.
143
144 #:phases
145 (modify-phases %standard-phases
146 (add-before 'configure 'generate-fonts&hardcore-libvulkan-path
147 (lambda* (#:key inputs outputs #:allow-other-keys)
148 (let ((fontfile
149 (string-append (assoc-ref inputs "font-wqy-microhei")
150 "/share/fonts/truetype/wqy-microhei.ttc"))
151 (libvulkan
152 (string-append (assoc-ref inputs "vulkan-icd-loader")
153 "/lib/libvulkan.so")))
154 (chdir "docs")
155 (invoke "bash" "-c" "g++ -O2 -std=c++11 $(freetype-config \
156 --cflags --libs) gc-font-tool.cpp -o gc-font-tool")
157 (invoke "./gc-font-tool" "a" fontfile "font_western.bin")
158 (invoke "./gc-font-tool" "s" fontfile "font_japanese.bin")
159 (copy-file "font_japanese.bin" "../Data/Sys/GC/font_japanese.bin")
160 (copy-file "font_western.bin" "../Data/Sys/GC/font_western.bin")
161 (chdir "..")
162 (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp"
163 (("libvulkan.so") libvulkan))
164 #t))))
165
166 #:configure-flags
167 (list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
168 (assoc-ref %build-inputs "gtk+")
169 "/lib/gtk-2.0/include")
170 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
171 (assoc-ref %build-inputs "glib")
172 "/lib/glib-2.0/include")
173 (string-append "-DX11_INCLUDE_DIR="
174 (assoc-ref %build-inputs "libx11")
175 "/include")
176 (string-append "-DX11_LIBRARIES="
177 (assoc-ref %build-inputs "libx11")
178 "/lib/libX11.so")
179 "-DX11_FOUND=1")))
180 (native-inputs
181 `(("pkg-config" ,pkg-config)
182 ("gettext" ,gnu-gettext)))
183 (inputs
184 `(("alsa-lib" ,alsa-lib)
185 ("ao" ,ao)
186 ("bluez" ,bluez)
187 ("curl" ,curl)
188 ("eudev" ,eudev)
189 ("ffmpeg" ,ffmpeg)
190 ("font-wqy-microhei" ,font-wqy-microhei)
191 ("freetype" ,freetype)
192 ("glew" ,glew)
193 ("glib" ,glib)
194 ("glu" ,glu)
195 ("gtk+" ,gtk+-2)
196 ("hidapi" ,hidapi)
197 ("libevdev" ,libevdev)
198 ("libpng" ,libpng)
199 ("libusb" ,libusb)
200 ("libx11" ,libx11)
201 ("libxi" ,libxi)
202 ("libxrandr" ,libxrandr)
203 ("lzo" ,lzo)
204 ("mbedtls-apache" ,mbedtls-apache)
205 ("mesa" ,mesa)
206 ("miniupnpc" ,miniupnpc)
207 ("openal" ,openal)
208 ("pulseaudio" ,pulseaudio)
209 ("qtbase" ,qtbase)
210 ("sdl2" ,sdl2)
211 ("sfml" ,sfml)
212 ("soil" ,soil)
213 ("soundtouch" ,soundtouch)
214 ("vulkan-icd-loader" ,vulkan-icd-loader)
215 ("wxwidgets" ,wxwidgets-gtk2-3.1)
216 ("zlib" ,zlib)))
217 (home-page "https://dolphin-emu.org/")
218 (synopsis "Nintendo Wii and GameCube emulator")
219 (description
220 "Dolphin is an emulator for two Nintendo video game consoles: the
221 GameCube and the Wii. It provides compatibility with all PC controllers,
222 turbo speed, networked multiplayer, and graphical enhancements.")
223 (supported-systems '("x86_64-linux" "aarch64-linux"))
224 ; dolphin/Data/Sys/GC/font_*.bin: Licensed under ASL2.0.
225 (license (list license:gpl2+ license:asl2.0 license:fdl1.2+)))))
226
227 (define-public dosbox
228 (package
229 (name "dosbox")
230 (version "0.74.svn3947")
231 (source (origin
232 (method svn-fetch)
233 (uri (svn-reference
234 (url "http://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk/")
235 (revision 3947)))
236 (file-name (string-append name "-" version "-checkout"))
237 ;; Use SVN head, since the last release (2010) is incompatible
238 ;; with GCC 4.8+ (see
239 ;; <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624976>).
240 (sha256
241 (base32
242 "1p918j6090d1nkvgq7ifvmn506zrdmyi32y7p3ms40d5ssqjg8fj"))))
243 (build-system gnu-build-system)
244 (arguments
245 `(#:phases (modify-phases %standard-phases
246 (add-after
247 'unpack 'autogen.sh
248 (lambda _
249 (zero? (system* "sh" "autogen.sh")))))))
250 (native-inputs
251 `(("autoconf" ,autoconf)
252 ("automake" ,automake)))
253 (inputs
254 `(("sdl" ,sdl)
255 ("libpng" ,libpng)
256 ("zlib" ,zlib)
257 ("alsa-lib" ,alsa-lib)
258 ("glu" ,glu)
259 ("mesa" ,mesa)))
260 (home-page "http://www.dosbox.com")
261 (synopsis "X86 emulator with CGA/EGA/VGA/etc. graphics and sound")
262 (description "DOSBox is a DOS-emulator that uses the SDL library. DOSBox
263 also emulates CPU:286/386 realmode/protected mode, Directory
264 FileSystem/XMS/EMS, Tandy/Hercules/CGA/EGA/VGA/VESA graphics, a
265 SoundBlaster/Gravis Ultra Sound card for excellent sound compatibility with
266 older games.")
267 (license license:gpl2+)))
268
269 (define-public emulation-station
270 (let ((commit "646bede3d9ec0acf0ae378415edac136774a66c5"))
271 (package
272 (name "emulation-station")
273 (version "2.0.1")
274 (source (origin
275 (method git-fetch) ; no tarball available
276 (uri (git-reference
277 (url "https://github.com/Aloshi/EmulationStation.git")
278 (commit commit))) ; no version tag
279 (file-name (string-append name "-" version "-checkout"))
280 (sha256
281 (base32
282 "0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v"))))
283 (build-system cmake-build-system)
284 (arguments
285 '(#:tests? #f)) ; no tests
286 (inputs
287 `(("alsa-lib" ,alsa-lib)
288 ("boost" ,boost)
289 ("curl" ,curl)
290 ("eigin" ,eigen)
291 ("freeimage" ,freeimage)
292 ("freetype" ,freetype)
293 ("mesa" ,mesa)
294 ("sdl2" ,sdl2)))
295 (synopsis "Video game console emulator front-end")
296 (description "EmulationStation provides a graphical front-end to a large
297 number of video game console emulators. It features an interface that is
298 usable with any game controller that has at least 4 buttons, theming support,
299 and a game metadata scraper.")
300 (home-page "http://www.emulationstation.org")
301 (license license:expat))))
302
303 (define-public higan
304 (package
305 (name "higan")
306 (version "106")
307 (source
308 (origin
309 (method url-fetch)
310 (uri (string-append
311 "https://gitlab.com/higan/higan/repository/archive.tar.gz?ref=v"
312 version))
313 (file-name (string-append name "-" version ".tar.gz"))
314 (sha256
315 (base32 "0y42pra0dxzlbkyzcp3r8a39pji2bj3p9fl40425f60af2igr4rw"))
316 (patches (search-patches "higan-remove-march-native-flag.patch"))))
317 (build-system gnu-build-system)
318 (native-inputs
319 `(("pkg-config" ,pkg-config)))
320 (inputs
321 `(("alsa-lib" ,alsa-lib)
322 ("ao" ,ao)
323 ("eudev" ,eudev)
324 ("gtk+" ,gtk+-2)
325 ("gtksourceview-2" ,gtksourceview-2)
326 ("libxv" ,libxv)
327 ("mesa" ,mesa)
328 ("openal" ,openal)
329 ("pulseaudio" ,pulseaudio)
330 ("sdl" ,sdl)))
331 (arguments
332 '(#:phases
333 (let ((build-phase (assoc-ref %standard-phases 'build))
334 (install-phase (assoc-ref %standard-phases 'install)))
335 (modify-phases %standard-phases
336 ;; The higan build system has no configure phase.
337 (delete 'configure)
338 (add-before 'build 'chdir-to-higan
339 (lambda _
340 (chdir "higan")))
341 (add-before 'install 'create-/share/applications
342 (lambda* (#:key outputs #:allow-other-keys)
343 (let ((out (assoc-ref outputs "out")))
344 ;; It seems the author forgot to do this in the Makefile.
345 (mkdir-p (string-append out "/share/applications")))))
346 (add-after 'install 'chdir-to-icarus
347 (lambda _
348 (chdir "../icarus")))
349 (add-after 'chdir-to-icarus 'build-icarus build-phase)
350 (add-after 'build-icarus 'install-icarus install-phase)
351 (add-after 'install-icarus 'wrap-higan-executable
352 (lambda* (#:key inputs outputs #:allow-other-keys)
353 (let* ((out (assoc-ref outputs "out"))
354 (bin (string-append out "/bin"))
355 (higan (string-append bin "/higan"))
356 (higan-original (string-append higan "-original"))
357 (bash (string-append (assoc-ref inputs "bash")
358 "/bin/bash"))
359 (coreutils (assoc-ref inputs "coreutils"))
360 (mkdir (string-append coreutils "/bin/mkdir"))
361 (cp (string-append coreutils "/bin/cp"))
362 (cp-r (string-append cp " -r --no-preserve=mode")))
363 ;; First, have the executable make sure ~/.local/share/higan
364 ;; contains up to date files. Higan insists on looking there
365 ;; for these data files.
366 (rename-file higan higan-original)
367 (with-output-to-file higan
368 (lambda ()
369 (display
370 (string-append
371 "#!" bash "\n"
372 ;; higan doesn't respect $XDG_DATA_HOME
373 mkdir " -p ~/.local/share\n"
374 cp-r " " out "/share/higan ~/.local/share\n"
375 "exec " higan-original))))
376 (chmod higan #o555)
377 ;; Second, make sure higan will find icarus in PATH.
378 (wrap-program higan
379 `("PATH" ":" prefix (,bin))))))))
380 #:make-flags
381 (list "compiler=g++"
382 (string-append "prefix=" (assoc-ref %outputs "out")))
383 ;; There is no test suite.
384 #:tests? #f))
385 (home-page "http://byuu.org/emulation/higan/")
386 (synopsis "Nintendo multi-system emulator")
387 (description
388 "higan (formerly bsnes) is an emulator for multiple Nintendo video game
389 consoles, including the Nintendo Entertainment System (NES/Famicom), Super
390 Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy
391 Color (GBC), and Game Boy Advance (GBA). It also supports the subsystems
392 Super Game Boy, BS-X Satellaview, and Sufami Turbo.")
393 ;; As noted in these files among more:
394 ;; - icarus/icarus.cpp
395 ;; - higan/emulator/emulator.hpp
396 (license license:gpl3)))
397
398 (define-public mgba
399 (package
400 (name "mgba")
401 (version "0.6.1")
402 (source (origin
403 (method url-fetch)
404 (uri (string-append "https://github.com/mgba-emu/mgba/archive/"
405 version ".tar.gz"))
406 (file-name (string-append name "-" version ".tar.gz"))
407 (sha256
408 (base32
409 "0xmq1q1j71hnpd49wm91cqq8w5zdhb921cm17jchp4qjmaqgwy3w"))
410 (modules '((guix build utils)))
411 (snippet
412 ;; Make sure we don't use the bundled software.
413 '(for-each
414 (lambda (subdir)
415 (let ((lib-subdir (string-append "src/third-party/" subdir)))
416 (delete-file-recursively lib-subdir)))
417 '("libpng" "lzma" "sqlite3" "zlib")))))
418 (build-system cmake-build-system)
419 (arguments
420 `(#:tests? #f ;no "test" target
421 #:configure-flags
422 (list "-DUSE_LZMA=OFF" ;do not use bundled LZMA
423 "-DUSE_LIBZIP=OFF" ;use "zlib" instead
424 (string-append "-DCMAKE_INSTALL_LIBDIR="
425 (assoc-ref %outputs "out") "/lib"))))
426 (native-inputs `(("pkg-config" ,pkg-config)))
427 (inputs `(("ffmpeg" ,ffmpeg)
428 ("imagemagick" ,imagemagick)
429 ("libedit" ,libedit)
430 ("libepoxy" ,libepoxy)
431 ("libpng" ,libpng)
432 ("mesa" ,mesa)
433 ("minizip" ,minizip)
434 ("ncurses" ,ncurses)
435 ("qtbase" ,qtbase)
436 ("qtmultimedia" ,qtmultimedia)
437 ("qttools" ,qttools)
438 ("sdl2" ,sdl2)
439 ("sqlite" ,sqlite)
440 ("zlib" ,zlib)))
441 (home-page "https://mgba.io")
442 (synopsis "Game Boy Advance emulator")
443 (description
444 "mGBA is an emulator for running Game Boy Advance games. It aims to be
445 faster and more accurate than many existing Game Boy Advance emulators, as
446 well as adding features that other emulators lack. It also supports Game Boy
447 and Game Boy Color games.")
448 ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+ and "inih.c" is
449 ;; BSD-3.
450 (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3))))
451
452 (define-public mupen64plus-core
453 (package
454 (name "mupen64plus-core")
455 (version "2.5")
456 (source
457 (origin
458 (method url-fetch)
459 (uri (string-append
460 "https://github.com/mupen64plus/mupen64plus-core/archive/"
461 version ".tar.gz"))
462 (file-name (string-append name "-" version ".tar.gz"))
463 (sha256
464 (base32 "0dg2hksm5qni2hcha93k7n4fqr92888p946f7phb0ndschzfh9kk"))))
465 (build-system gnu-build-system)
466 (native-inputs
467 `(("pkg-config" ,pkg-config)
468 ("which" ,which)))
469 (inputs
470 `(("freetype" ,freetype)
471 ("glu" ,glu)
472 ("libpng" ,libpng)
473 ("mesa" ,mesa)
474 ("sdl2" ,sdl2)
475 ("zlib" ,zlib)))
476 (arguments
477 '(#:phases
478 (modify-phases %standard-phases
479 ;; The mupen64plus build system has no configure phase.
480 (delete 'configure)
481 ;; Makefile is in a subdirectory.
482 (add-before
483 'build 'cd-to-project-dir
484 (lambda _
485 (chdir "projects/unix"))))
486 #:make-flags (let ((out (assoc-ref %outputs "out")))
487 (list "all" (string-append "PREFIX=" out)))
488 ;; There are no tests.
489 #:tests? #f))
490 ;; As per the Makefile (in projects/unix/Makefile):
491 (supported-systems '("i686-linux" "x86_64-linux"))
492 (home-page "http://www.mupen64plus.org/")
493 (synopsis "Nintendo 64 emulator core library")
494 (description
495 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
496 which is capable of accurately playing many games. This package contains the
497 core library.")
498 (license license:gpl2+)))
499
500 (define-public mupen64plus-audio-sdl
501 (package
502 (name "mupen64plus-audio-sdl")
503 (version "2.5")
504 (source
505 (origin
506 (method url-fetch)
507 (uri (string-append
508 "https://github.com/mupen64plus/mupen64plus-audio-sdl/archive/"
509 version ".tar.gz"))
510 (file-name (string-append name "-" version ".tar.gz"))
511 (sha256
512 (base32 "0ss6w92n2rpfnazhg9lbq0nvs3fqx93nliz3k3wjxdlx4dpi7h3a"))))
513 (build-system gnu-build-system)
514 (native-inputs
515 `(("pkg-config" ,pkg-config)
516 ("which" ,which)))
517 (inputs
518 `(("mupen64plus-core" ,mupen64plus-core)
519 ("sdl2" ,sdl2)))
520 (arguments
521 '(#:phases
522 (modify-phases %standard-phases
523 ;; The mupen64plus build system has no configure phase.
524 (delete 'configure)
525 ;; Makefile is in a subdirectory.
526 (add-before
527 'build 'cd-to-project-dir
528 (lambda _
529 (chdir "projects/unix"))))
530 #:make-flags
531 (let ((out (assoc-ref %outputs "out"))
532 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
533 (list "all"
534 (string-append "PREFIX=" out)
535 (string-append "APIDIR=" m64p "/include/mupen64plus")))
536 ;; There are no tests.
537 #:tests? #f))
538 (home-page "http://www.mupen64plus.org/")
539 (synopsis "Mupen64Plus SDL input plugin")
540 (description
541 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
542 which is capable of accurately playing many games. This package contains the
543 SDL audio plugin.")
544 (license license:gpl2+)))
545
546 (define-public mupen64plus-input-sdl
547 (package
548 (name "mupen64plus-input-sdl")
549 (version "2.5")
550 (source
551 (origin
552 (method url-fetch)
553 (uri (string-append
554 "https://github.com/mupen64plus/mupen64plus-input-sdl/archive/"
555 version ".tar.gz"))
556 (file-name (string-append name "-" version ".tar.gz"))
557 (sha256
558 (base32 "11sj5dbalp2nrlmki34vy7wy28vc175pnnkdk65p8599hnyq37ri"))))
559 (build-system gnu-build-system)
560 (native-inputs
561 `(("which" ,which)))
562 (inputs
563 `(("mupen64plus-core" ,mupen64plus-core)
564 ("sdl2" ,sdl2)))
565 (arguments
566 '(#:phases
567 (modify-phases %standard-phases
568 ;; The mupen64plus build system has no configure phase.
569 (delete 'configure)
570 ;; Makefile is in a subdirectory.
571 (add-before
572 'build 'cd-to-project-dir
573 (lambda _
574 (chdir "projects/unix"))))
575 #:make-flags
576 (let ((out (assoc-ref %outputs "out"))
577 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
578 (list "all"
579 (string-append "PREFIX=" out)
580 (string-append "APIDIR=" m64p "/include/mupen64plus")))
581 ;; There are no tests.
582 #:tests? #f))
583 (home-page "http://www.mupen64plus.org/")
584 (synopsis "Mupen64Plus SDL input plugin")
585 (description
586 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
587 which is capable of accurately playing many games. This package contains the
588 SDL input plugin.")
589 (license license:gpl2+)))
590
591 (define-public mupen64plus-rsp-hle
592 (package
593 (name "mupen64plus-rsp-hle")
594 (version "2.5")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (string-append
599 "https://github.com/mupen64plus/mupen64plus-rsp-hle/archive/"
600 version ".tar.gz"))
601 (file-name (string-append name "-" version ".tar.gz"))
602 (sha256
603 (base32 "15h7mgz6xd2zjzm6l3f96sbs8kwr3xvbwzgikhnka79m6c69hsxv"))))
604 (build-system gnu-build-system)
605 (inputs
606 `(("mupen64plus-core" ,mupen64plus-core)))
607 (arguments
608 '(#:phases
609 (modify-phases %standard-phases
610 ;; The mupen64plus build system has no configure phase.
611 (delete 'configure)
612 ;; Makefile is in a subdirectory.
613 (add-before
614 'build 'cd-to-project-dir
615 (lambda _
616 (chdir "projects/unix"))))
617 #:make-flags
618 (let ((out (assoc-ref %outputs "out"))
619 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
620 (list "all"
621 (string-append "PREFIX=" out)
622 (string-append "APIDIR=" m64p "/include/mupen64plus")))
623 ;; There are no tests.
624 #:tests? #f))
625 (home-page "http://www.mupen64plus.org/")
626 (synopsis "Mupen64Plus SDL input plugin")
627 (description
628 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
629 which is capable of accurately playing many games. This package contains the
630 high-level emulation (HLE) RSP processor plugin.")
631 (license license:gpl2+)))
632
633 (define-public mupen64plus-rsp-z64
634 (package
635 (name "mupen64plus-rsp-z64")
636 (version "2.0.0")
637 (source
638 (origin
639 (method url-fetch)
640 (uri (string-append
641 "https://github.com/mupen64plus/mupen64plus-rsp-z64/archive/"
642 version ".tar.gz"))
643 (file-name (string-append name "-" version ".tar.gz"))
644 (sha256
645 (base32 "10jz1w2dhx5slhyk4m8mdqlpsd6cshchslr1fckb2ayzb1ls3ghi"))))
646 (build-system gnu-build-system)
647 (inputs
648 `(("mupen64plus-core" ,mupen64plus-core)))
649 (arguments
650 '(#:phases
651 (modify-phases %standard-phases
652 ;; The mupen64plus build system has no configure phase.
653 (delete 'configure)
654 ;; Makefile is in a subdirectory.
655 (add-before
656 'build 'cd-to-project-dir
657 (lambda _
658 (chdir "projects/unix"))))
659 #:make-flags
660 (let ((out (assoc-ref %outputs "out"))
661 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
662 (list "all"
663 (string-append "PREFIX=" out)
664 (string-append "APIDIR=" m64p "/include/mupen64plus")))
665 ;; There are no tests.
666 #:tests? #f))
667 (home-page "http://www.mupen64plus.org/")
668 (synopsis "Mupen64Plus SDL input plugin")
669 (description
670 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
671 which is capable of accurately playing many games. This package contains the
672 Z64 RSP processor plugin.")
673 (license license:gpl2+)))
674
675 (define-public mupen64plus-video-arachnoid
676 (package
677 (name "mupen64plus-video-arachnoid")
678 (version "2.0.0")
679 (source
680 (origin
681 (method url-fetch)
682 (uri (string-append
683 "https://github.com/mupen64plus/mupen64plus-video-arachnoid/archive/"
684 version ".tar.gz"))
685 (file-name (string-append name "-" version ".tar.gz"))
686 (sha256
687 (base32 "0jjwf144rihznm4lnqbhgigxw664v3v32wy94adaa6imk8z6gslh"))))
688 (build-system gnu-build-system)
689 (native-inputs
690 `(("pkg-config" ,pkg-config)
691 ("which" ,which)))
692 (inputs
693 `(("mesa" ,mesa)
694 ("mupen64plus-core" ,mupen64plus-core)))
695 (arguments
696 '(#:phases
697 (modify-phases %standard-phases
698 ;; The mupen64plus build system has no configure phase.
699 (delete 'configure)
700 ;; Makefile is in a subdirectory.
701 (add-before
702 'build 'cd-to-project-dir
703 (lambda _
704 (chdir "projects/unix"))))
705 #:make-flags
706 (let ((out (assoc-ref %outputs "out"))
707 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
708 (list "all"
709 (string-append "PREFIX=" out)
710 (string-append "APIDIR=" m64p "/include/mupen64plus")))
711 ;; There are no tests.
712 #:tests? #f))
713 (home-page "http://www.mupen64plus.org/")
714 (synopsis "Mupen64Plus Rice Video plugin")
715 (description
716 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
717 which is capable of accurately playing many games. This package contains the
718 Arachnoid video plugin.")
719 (license license:gpl2+)))
720
721 (define-public mupen64plus-video-glide64
722 (package
723 (name "mupen64plus-video-glide64")
724 (version "2.0.0")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (string-append
729 "https://github.com/mupen64plus/mupen64plus-video-glide64/archive/"
730 version ".tar.gz"))
731 (file-name (string-append name "-" version ".tar.gz"))
732 (sha256
733 (base32 "1rm55dbf6xgsq1blbzs6swa2ajv0qkn38acbljj346abnk6s3dla"))))
734 (build-system gnu-build-system)
735 (native-inputs
736 `(("pkg-config" ,pkg-config)
737 ("which" ,which)))
738 (inputs
739 `(("mesa" ,mesa)
740 ("mupen64plus-core" ,mupen64plus-core)
741 ("sdl2" ,sdl2)))
742 (arguments
743 '(#:phases
744 (modify-phases %standard-phases
745 ;; The mupen64plus build system has no configure phase.
746 (delete 'configure)
747 ;; Makefile is in a subdirectory.
748 (add-before
749 'build 'cd-to-project-dir
750 (lambda _
751 (chdir "projects/unix")))
752 ;; XXX Should be unnecessary with the next release.
753 (add-before
754 'build 'use-sdl2
755 (lambda _
756 (substitute* "Makefile"
757 (("SDL_CONFIG = (.*)sdl-config" all prefix)
758 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
759 #:make-flags
760 (let ((out (assoc-ref %outputs "out"))
761 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
762 (list "all"
763 (string-append "PREFIX=" out)
764 (string-append "APIDIR=" m64p "/include/mupen64plus")))
765 ;; There are no tests.
766 #:tests? #f))
767 (home-page "http://www.mupen64plus.org/")
768 (synopsis "Mupen64Plus Rice Video plugin")
769 (description
770 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
771 which is capable of accurately playing many games. This package contains the
772 Glide64 video plugin.")
773 (license license:gpl2+)))
774
775 (define-public mupen64plus-video-glide64mk2
776 (package
777 (name "mupen64plus-video-glide64mk2")
778 (version "2.5")
779 (source
780 (origin
781 (method url-fetch)
782 (uri (string-append
783 "https://github.com/mupen64plus/mupen64plus-video-glide64mk2/archive/"
784 version ".tar.gz"))
785 (file-name (string-append name "-" version ".tar.gz"))
786 (sha256
787 (base32 "1ihl4q293d6svba26b4mhapjcdg12p90gibz79b4mx423jlcxxj9"))))
788 (build-system gnu-build-system)
789 (native-inputs
790 `(("pkg-config" ,pkg-config)
791 ("which" ,which)))
792 (inputs
793 `(("boost" ,boost)
794 ("libpng" ,libpng)
795 ("mesa" ,mesa)
796 ("mupen64plus-core" ,mupen64plus-core)
797 ("sdl2" ,sdl2)
798 ("zlib" ,zlib)))
799 (arguments
800 '(#:phases
801 (modify-phases %standard-phases
802 ;; The mupen64plus build system has no configure phase.
803 (delete 'configure)
804 ;; Makefile is in a subdirectory.
805 (add-before
806 'build 'cd-to-project-dir
807 (lambda _
808 (chdir "projects/unix"))))
809 #:make-flags
810 (let ((out (assoc-ref %outputs "out"))
811 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
812 (list "all"
813 (string-append "PREFIX=" out)
814 (string-append "APIDIR=" m64p "/include/mupen64plus")))
815 ;; There are no tests.
816 #:tests? #f))
817 (home-page "http://www.mupen64plus.org/")
818 (synopsis "Mupen64Plus Rice Video plugin")
819 (description
820 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
821 which is capable of accurately playing many games. This package contains the
822 Glide64MK2 video plugin.")
823 (license license:gpl2+)))
824
825 (define-public mupen64plus-video-rice
826 (package
827 (name "mupen64plus-video-rice")
828 (version "2.5")
829 (source
830 (origin
831 (method url-fetch)
832 (uri (string-append
833 "https://github.com/mupen64plus/mupen64plus-video-rice/archive/"
834 version ".tar.gz"))
835 (file-name (string-append name "-" version ".tar.gz"))
836 (sha256
837 (base32 "0rd2scjmh285w61aj3mgx71whg5rqrjbry3cdgicczrnyvf8wdvk"))))
838 (build-system gnu-build-system)
839 (native-inputs
840 `(("pkg-config" ,pkg-config)
841 ("which" ,which)))
842 (inputs
843 `(("libpng" ,libpng)
844 ("mesa" ,mesa)
845 ("mupen64plus-core" ,mupen64plus-core)
846 ("sdl2" ,sdl2)))
847 (arguments
848 '(#:phases
849 (modify-phases %standard-phases
850 ;; The mupen64plus build system has no configure phase.
851 (delete 'configure)
852 ;; Makefile is in a subdirectory.
853 (add-before
854 'build 'cd-to-project-dir
855 (lambda _
856 (chdir "projects/unix"))))
857 #:make-flags
858 (let ((out (assoc-ref %outputs "out"))
859 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
860 (list "all"
861 (string-append "PREFIX=" out)
862 (string-append "APIDIR=" m64p "/include/mupen64plus")))
863 ;; There are no tests.
864 #:tests? #f))
865 (home-page "http://www.mupen64plus.org/")
866 (synopsis "Mupen64Plus Rice Video plugin")
867 (description
868 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
869 which is capable of accurately playing many games. This package contains the
870 Rice Video plugin.")
871 (license license:gpl2+)))
872
873 (define-public mupen64plus-video-z64
874 (package
875 (name "mupen64plus-video-z64")
876 (version "2.0.0")
877 (source
878 (origin
879 (method url-fetch)
880 (uri (string-append
881 "https://github.com/mupen64plus/mupen64plus-video-z64/archive/"
882 version ".tar.gz"))
883 (file-name (string-append name "-" version ".tar.gz"))
884 (sha256
885 (base32 "1x7wsjs5gx2iwx20p4cjcbf696zsjlh31qxmghwv0ifrq8x58s1b"))))
886 (build-system gnu-build-system)
887 (native-inputs
888 `(("pkg-config" ,pkg-config)
889 ("which" ,which)))
890 (inputs
891 `(("glew" ,glew)
892 ("mupen64plus-core" ,mupen64plus-core)
893 ("sdl2" ,sdl2)))
894 (arguments
895 '(#:phases
896 (modify-phases %standard-phases
897 ;; The mupen64plus build system has no configure phase.
898 (delete 'configure)
899 ;; Makefile is in a subdirectory.
900 (add-before
901 'build 'cd-to-project-dir
902 (lambda _
903 (chdir "projects/unix")))
904 ;; XXX Should be unnecessary with the next release.
905 (add-before
906 'build 'use-sdl2
907 (lambda _
908 (substitute* "Makefile"
909 (("SDL_CONFIG = (.*)sdl-config" all prefix)
910 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
911 #:make-flags
912 (let ((out (assoc-ref %outputs "out"))
913 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
914 (list "all"
915 (string-append "PREFIX=" out)
916 (string-append "APIDIR=" m64p "/include/mupen64plus")))
917 ;; There are no tests.
918 #:tests? #f))
919 (home-page "http://www.mupen64plus.org/")
920 (synopsis "Mupen64Plus Z64 video plugin")
921 (description
922 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
923 which is capable of accurately playing many games. This package contains the
924 Z64 video plugin.")
925 (license license:gpl2+)))
926
927 (define-public mupen64plus-ui-console
928 (package
929 (name "mupen64plus-ui-console")
930 (version "2.5")
931 (source
932 (origin
933 (method url-fetch)
934 (uri (string-append
935 "https://github.com/mupen64plus/mupen64plus-ui-console/archive/"
936 version ".tar.gz"))
937 (file-name (string-append name "-" version ".tar.gz"))
938 (sha256
939 (base32 "04qkpd8ic7xsgnqz7spl00wxdygf79m7d1k8rabbygjk5lg6p8z2"))
940 (patches (search-patches "mupen64plus-ui-console-notice.patch"))))
941 (build-system gnu-build-system)
942 (native-inputs
943 `(("pkg-config" ,pkg-config)
944 ("which" ,which)))
945 (inputs
946 `(("sdl2" ,sdl2)))
947 ;; Mupen64Plus supports a single data directory and a single plugin
948 ;; directory in its configuration, yet we need data and plugin files from
949 ;; a variety of packages. The best way to deal with this is to install
950 ;; all packages from which data and plugin files are needed into one's
951 ;; profile, and point the configuration there. Hence, propagate the most
952 ;; important packages here to save the user from the bother. The patch
953 ;; mupen64plus-ui-console-notice also gives users instructions on what
954 ;; they need to do in order to point the configuration to their profile.
955 (propagated-inputs
956 `(("mupen64plus-core" ,mupen64plus-core)
957 ("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl)
958 ("mupen64plus-input-sdl" ,mupen64plus-input-sdl)
959 ("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle)
960 ("mupen64plus-video-glide64" ,mupen64plus-video-glide64)
961 ("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2)
962 ("mupen64plus-video-rice" ,mupen64plus-video-rice)))
963 (arguments
964 '(#:phases
965 (modify-phases %standard-phases
966 ;; The mupen64plus build system has no configure phase.
967 (delete 'configure)
968 ;; Makefile is in a subdirectory.
969 (add-before
970 'build 'cd-to-project-dir
971 (lambda _
972 (chdir "projects/unix"))))
973 #:make-flags
974 (let ((out (assoc-ref %outputs "out"))
975 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
976 (list "all"
977 (string-append "PREFIX=" out)
978 (string-append "APIDIR=" m64p "/include/mupen64plus")
979 ;; Trailing slash matters here.
980 (string-append "COREDIR=" m64p "/lib/")))
981 ;; There are no tests.
982 #:tests? #f))
983 (home-page "http://www.mupen64plus.org/")
984 (synopsis "Mupen64Plus SDL input plugin")
985 (description
986 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
987 which is capable of accurately playing many games. This package contains the
988 command line user interface. Installing this package is the easiest way
989 towards a working Mupen64Plus for casual users.")
990 (license license:gpl2+)))
991
992 (define-public nestopia-ue
993 (package
994 (name "nestopia-ue")
995 (version "1.47")
996 (source (origin
997 (method url-fetch)
998 (uri (string-append
999 "https://github.com/rdanbrook/nestopia/archive/"
1000 version ".tar.gz"))
1001 (file-name (string-append name "-" version ".tar.gz"))
1002 (sha256
1003 (base32
1004 "1dzrrjmvyqks64q5l5pfly80jb6qcsbj5b3dm40fijd5xnpbapci"))
1005 (modules '((guix build utils)))
1006 (snippet
1007 '(begin
1008 ;; We don't need libretro for the GNU/Linux build.
1009 (delete-file-recursively "libretro")
1010 ;; Use system zlib.
1011 (delete-file-recursively "source/zlib")
1012 (substitute* "source/core/NstZlib.cpp"
1013 (("#include \"../zlib/zlib.h\"") "#include <zlib.h>"))))))
1014 (build-system gnu-build-system)
1015 (native-inputs
1016 `(("pkg-config" ,pkg-config)))
1017 (inputs
1018 `(("ao" ,ao)
1019 ("glu" ,glu)
1020 ("gtk+" ,gtk+)
1021 ("libarchive" ,libarchive)
1022 ("mesa" ,mesa)
1023 ("sdl2" ,sdl2)
1024 ("zlib" ,zlib)))
1025 (arguments
1026 '(#:phases
1027 (modify-phases %standard-phases
1028 ;; The Nestopia build system consists solely of a Makefile.
1029 (delete 'configure)
1030 (add-before 'build 'remove-xdg-desktop-menu-call
1031 (lambda _
1032 (substitute* "Makefile"
1033 (("xdg-desktop-menu install .*") ""))))
1034 (add-before 'build 'remove-gdkwayland-include
1035 (lambda _
1036 (substitute* "source/unix/gtkui/gtkui.h"
1037 (("#include <gdk/gdkwayland\\.h>") "")))))
1038 #:make-flags (let ((out (assoc-ref %outputs "out")))
1039 (list "CC=gcc" "CXX=g++" (string-append "PREFIX=" out)))
1040 ;; There are no tests.
1041 #:tests? #f))
1042 (home-page "http://0ldsk00l.ca/nestopia/")
1043 (synopsis "Nintendo Entertainment System (NES/Famicom) emulator")
1044 (description
1045 "Nestopia UE (Undead Edition) is a fork of the Nintendo Entertainment
1046 System (NES/Famicom) emulator Nestopia, with enhancements from members of the
1047 emulation community. It provides highly accurate emulation.")
1048 (license license:gpl2+)))
1049
1050 (define-public retroarch
1051 (package
1052 (name "retroarch")
1053 (version "1.7.1")
1054 (source
1055 (origin
1056 (method url-fetch)
1057 (uri (string-append "https://github.com/libretro/RetroArch/archive/v"
1058 version ".tar.gz"))
1059 (file-name (string-append name "-" version ".tar.gz"))
1060 (sha256
1061 (base32 "0fdribjfc5zz9brzhqcxw6m76kvyg13l67aiigszv4wsjd5j3gpz"))))
1062 (build-system gnu-build-system)
1063 (arguments
1064 '(#:tests? #f ; no tests
1065 #:phases
1066 (modify-phases %standard-phases
1067 (replace 'configure
1068 (lambda* (#:key inputs outputs #:allow-other-keys)
1069 (let* ((out (assoc-ref outputs "out"))
1070 (etc (string-append out "/etc"))
1071 (vulkan (assoc-ref inputs "vulkan-icd-loader")))
1072 ;; Hard-code the path to libvulkan.so.
1073 (substitute* "gfx/common/vulkan_common.c"
1074 (("libvulkan.so") (string-append vulkan "/lib/libvulkan.so")))
1075 (substitute* "qb/qb.libs.sh"
1076 (("/bin/true") (which "true")))
1077 ;; The configure script does not yet accept the extra arguments
1078 ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase.
1079 (zero? (system*
1080 "./configure"
1081 (string-append "--prefix=" out)
1082 (string-append "--global-config-dir=" etc)))))))))
1083 (inputs
1084 `(("alsa-lib" ,alsa-lib)
1085 ("ffmpeg" ,ffmpeg)
1086 ("freetype" ,freetype)
1087 ("libxinerama" ,libxinerama)
1088 ("libxkbcommon" ,libxkbcommon)
1089 ("libxml2" ,libxml2)
1090 ("libxv" ,libxv)
1091 ("mesa" ,mesa)
1092 ("openal" ,openal)
1093 ("pulseaudio" ,pulseaudio)
1094 ("python" ,python)
1095 ("sdl" ,sdl2)
1096 ("udev" ,eudev)
1097 ("vulkan-icd-loader" ,vulkan-icd-loader)
1098 ("wayland" ,wayland)
1099 ("zlib" ,zlib)))
1100 (native-inputs
1101 `(("pkg-config" ,pkg-config)
1102 ("which" ,which)))
1103 (home-page "https://www.libretro.com/")
1104 (synopsis "Reference frontend for the libretro API")
1105 (description
1106 "Libretro is a simple but powerful development interface that allows for
1107 the easy creation of emulators, games and multimedia applications that can plug
1108 straight into any libretro-compatible frontend. RetroArch is the official
1109 reference frontend for the libretro API, currently used by most as a modular
1110 multi-system game/emulator system.")
1111 (license license:gpl3+)))