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, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
10 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
13 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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 assembly)
37 #:use-module (gnu packages audio)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages boost)
41 #:use-module (gnu packages backup)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages curl)
44 #:use-module (gnu packages databases)
45 #:use-module (gnu packages fonts)
46 #:use-module (gnu packages fontutils)
47 #:use-module (gnu packages freedesktop)
48 #:use-module (gnu packages game-development)
49 #:use-module (gnu packages gcc)
50 #:use-module (gnu packages gettext)
51 #:use-module (gnu packages gl)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages image)
55 #:use-module (gnu packages imagemagick)
56 #:use-module (gnu packages libedit)
57 #:use-module (gnu packages libusb)
58 #:use-module (gnu packages linux)
59 #:use-module (gnu packages mp3)
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages pkg-config)
62 #:use-module (gnu packages pulseaudio)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages qt)
65 #:use-module (gnu packages sdl)
66 #:use-module (gnu packages tls)
67 #:use-module (gnu packages upnp)
68 #:use-module (gnu packages video)
69 #:use-module (gnu packages vulkan)
70 #:use-module (gnu packages wxwidgets)
71 #:use-module (gnu packages xdisorg)
72 #:use-module (gnu packages xiph)
73 #:use-module (gnu packages xml)
74 #:use-module (gnu packages xorg)
75 #:use-module (guix build-system cmake)
76 #:use-module (guix build-system gnu))
78 (define-public desmume
86 "mirror://sourceforge/desmume/desmume/"
87 version "/desmume-" version ".tar.gz"))
90 "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs"))))
91 (build-system gnu-build-system)
93 ;; Enable support for WiFi and microphone.
94 `(#:configure-flags '("--enable-wifi"
97 `(("pkg-config" ,pkg-config)
98 ("intltool" ,intltool)))
105 (home-page "http://desmume.org/")
106 (synopsis "Nintendo DS emulator")
108 "DeSmuME is an emulator for the Nintendo DS handheld gaming console.")
109 (license license:gpl2)))
111 ;; Building from recent Git because the official 5.0 release no longer builds.
112 (define-public dolphin-emu
113 (let ((commit "47fd8c6eff4cdea7660d0fa78040f98d1d4fa136")
117 (version (git-version "5.0" revision commit))
122 (url "https://github.com/dolphin-emu/dolphin.git")
124 (file-name (git-file-name name version))
125 (modules '((guix build utils)))
128 ;; Remove external stuff we don't need.
129 (for-each (lambda (dir)
130 (delete-file-recursively
131 (string-append "Externals/" dir)))
132 '("LZO" "OpenAL" "Qt" "SFML" "SOIL" "curl" "ffmpeg"
133 "gettext" "hidapi" "libpng" "libusb" "mbedtls"
134 "miniupnpc" "wxWidgets3" "zlib"))
136 (for-each delete-file (find-files "." ".*\\.(bin|dsy|exe|jar|rar)$"))
140 "1gp2sshnr0dswdawxd5ix96nksp435b52bqvpjx8pmn523k29zsw"))))
141 (build-system cmake-build-system)
144 ;; The FindGTK2 cmake script only checks hardcoded directories for
148 (modify-phases %standard-phases
149 (add-before 'configure 'fixgcc7
151 (unsetenv "C_INCLUDE_PATH")
152 (unsetenv "CPLUS_INCLUDE_PATH")))
153 (add-before 'configure 'generate-fonts&hardcore-libvulkan-path
154 (lambda* (#:key inputs outputs #:allow-other-keys)
156 (string-append (assoc-ref inputs "font-wqy-microhei")
157 "/share/fonts/truetype/wqy-microhei.ttc"))
159 (string-append (assoc-ref inputs "vulkan-loader")
160 "/lib/libvulkan.so")))
162 (invoke "bash" "-c" "g++ -O2 -std=c++11 $(freetype-config \
163 --cflags --libs) gc-font-tool.cpp -o gc-font-tool")
164 (invoke "./gc-font-tool" "a" fontfile "font_western.bin")
165 (invoke "./gc-font-tool" "s" fontfile "font_japanese.bin")
166 (copy-file "font_japanese.bin" "../Data/Sys/GC/font_japanese.bin")
167 (copy-file "font_western.bin" "../Data/Sys/GC/font_western.bin")
169 (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp"
170 (("libvulkan.so") libvulkan))
174 (list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
175 (assoc-ref %build-inputs "gtk+")
176 "/lib/gtk-2.0/include")
177 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
178 (assoc-ref %build-inputs "glib")
179 "/lib/glib-2.0/include")
180 (string-append "-DX11_INCLUDE_DIR="
181 (assoc-ref %build-inputs "libx11")
183 (string-append "-DX11_LIBRARIES="
184 (assoc-ref %build-inputs "libx11")
188 `(("pkg-config" ,pkg-config)
189 ("gcc" ,gcc-7) ; Building with gcc@5 doesn't work anymore.
190 ("gettext" ,gnu-gettext)))
192 `(("alsa-lib" ,alsa-lib)
197 ("ffmpeg" ,ffmpeg-3.4)
198 ("font-wqy-microhei" ,font-wqy-microhei)
199 ("freetype" ,freetype)
205 ("libevdev" ,libevdev)
210 ("libxrandr" ,libxrandr)
212 ("mbedtls-apache" ,mbedtls-apache)
214 ("miniupnpc" ,miniupnpc)
216 ("pulseaudio" ,pulseaudio)
221 ("soundtouch" ,soundtouch)
222 ("vulkan-loader" ,vulkan-loader)
223 ("wxwidgets" ,wxwidgets-gtk2-3.1)
225 (home-page "https://dolphin-emu.org/")
226 (synopsis "Nintendo Wii and GameCube emulator")
228 "Dolphin is an emulator for two Nintendo video game consoles: the
229 GameCube and the Wii. It provides compatibility with all PC controllers,
230 turbo speed, networked multiplayer, and graphical enhancements.")
231 (supported-systems '("x86_64-linux" "aarch64-linux"))
232 ; dolphin/Data/Sys/GC/font_*.bin: Licensed under ASL2.0.
233 (license (list license:gpl2+ license:asl2.0 license:fdl1.2+)))))
235 (define-public dosbox
238 (version "0.74.svn3947")
242 (url "http://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk/")
244 (file-name (string-append name "-" version "-checkout"))
245 ;; Use SVN head, since the last release (2010) is incompatible
246 ;; with GCC 4.8+ (see
247 ;; <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624976>).
250 "1p918j6090d1nkvgq7ifvmn506zrdmyi32y7p3ms40d5ssqjg8fj"))))
251 (build-system gnu-build-system)
253 `(#:phases (modify-phases %standard-phases
257 (zero? (system* "sh" "autogen.sh")))))))
259 `(("autoconf" ,autoconf)
260 ("automake" ,automake)))
265 ("alsa-lib" ,alsa-lib)
268 (home-page "http://www.dosbox.com")
269 (synopsis "X86 emulator with CGA/EGA/VGA/etc. graphics and sound")
270 (description "DOSBox is a DOS-emulator that uses the SDL library. DOSBox
271 also emulates CPU:286/386 realmode/protected mode, Directory
272 FileSystem/XMS/EMS, Tandy/Hercules/CGA/EGA/VGA/VESA graphics, a
273 SoundBlaster/Gravis Ultra Sound card for excellent sound compatibility with
275 (license license:gpl2+)))
277 (define-public emulation-station
278 (let ((commit "646bede3d9ec0acf0ae378415edac136774a66c5"))
280 (name "emulation-station")
283 (method git-fetch) ; no tarball available
285 (url "https://github.com/Aloshi/EmulationStation.git")
286 (commit commit))) ; no version tag
287 (file-name (string-append name "-" version "-checkout"))
290 "0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v"))))
291 (build-system cmake-build-system)
293 '(#:tests? #f)) ; no tests
295 `(("alsa-lib" ,alsa-lib)
299 ("freeimage" ,freeimage)
300 ("freetype" ,freetype)
303 (synopsis "Video game console emulator front-end")
304 (description "EmulationStation provides a graphical front-end to a large
305 number of video game console emulators. It features an interface that is
306 usable with any game controller that has at least 4 buttons, theming support,
307 and a game metadata scraper.")
308 (home-page "http://www.emulationstation.org")
309 (license license:expat))))
319 "https://gitlab.com/higan/higan/repository/archive.tar.gz?ref=v"
321 (file-name (string-append name "-" version ".tar.gz"))
323 (base32 "0y42pra0dxzlbkyzcp3r8a39pji2bj3p9fl40425f60af2igr4rw"))
324 (patches (search-patches "higan-remove-march-native-flag.patch"))))
325 (build-system gnu-build-system)
327 `(("pkg-config" ,pkg-config)))
329 `(("alsa-lib" ,alsa-lib)
333 ("gtksourceview-2" ,gtksourceview-2)
337 ("pulseaudio" ,pulseaudio)
341 (let ((build-phase (assoc-ref %standard-phases 'build))
342 (install-phase (assoc-ref %standard-phases 'install)))
343 (modify-phases %standard-phases
344 ;; The higan build system has no configure phase.
346 (add-before 'build 'chdir-to-higan
349 (add-before 'install 'create-/share/applications
350 (lambda* (#:key outputs #:allow-other-keys)
351 (let ((out (assoc-ref outputs "out")))
352 ;; It seems the author forgot to do this in the Makefile.
353 (mkdir-p (string-append out "/share/applications")))))
354 (add-after 'install 'chdir-to-icarus
356 (chdir "../icarus")))
357 (add-after 'chdir-to-icarus 'build-icarus build-phase)
358 (add-after 'build-icarus 'install-icarus install-phase)
359 (add-after 'install-icarus 'wrap-higan-executable
360 (lambda* (#:key inputs outputs #:allow-other-keys)
361 (let* ((out (assoc-ref outputs "out"))
362 (bin (string-append out "/bin"))
363 (higan (string-append bin "/higan"))
364 (higan-original (string-append higan "-original"))
365 (bash (string-append (assoc-ref inputs "bash")
367 (coreutils (assoc-ref inputs "coreutils"))
368 (mkdir (string-append coreutils "/bin/mkdir"))
369 (cp (string-append coreutils "/bin/cp"))
370 (cp-r (string-append cp " -r --no-preserve=mode")))
371 ;; First, have the executable make sure ~/.local/share/higan
372 ;; contains up to date files. Higan insists on looking there
373 ;; for these data files.
374 (rename-file higan higan-original)
375 (with-output-to-file higan
380 ;; higan doesn't respect $XDG_DATA_HOME
381 mkdir " -p ~/.local/share\n"
382 cp-r " " out "/share/higan ~/.local/share\n"
383 "exec " higan-original))))
385 ;; Second, make sure higan will find icarus in PATH.
387 `("PATH" ":" prefix (,bin))))))))
390 (string-append "prefix=" (assoc-ref %outputs "out")))
391 ;; There is no test suite.
393 (home-page "http://byuu.org/emulation/higan/")
394 (synopsis "Nintendo multi-system emulator")
396 "higan (formerly bsnes) is an emulator for multiple Nintendo video game
397 consoles, including the Nintendo Entertainment System (NES/Famicom), Super
398 Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy
399 Color (GBC), and Game Boy Advance (GBA). It also supports the subsystems
400 Super Game Boy, BS-X Satellaview, and Sufami Turbo.")
401 ;; As noted in these files among more:
402 ;; - icarus/icarus.cpp
403 ;; - higan/emulator/emulator.hpp
404 (license license:gpl3)))
412 (uri (string-append "https://github.com/mgba-emu/mgba/archive/"
414 (file-name (string-append name "-" version ".tar.gz"))
417 "16hgs6r5iym3lp2cjcnv9955333976yc5sgy2kkxlsi005n91j1m"))
418 (modules '((guix build utils)))
420 ;; Make sure we don't use the bundled software.
423 (let ((lib-subdir (string-append "src/third-party/" subdir)))
424 (delete-file-recursively lib-subdir)))
425 '("libpng" "lzma" "sqlite3" "zlib")))))
426 (build-system cmake-build-system)
428 `(#:tests? #f ;no "test" target
430 (list "-DUSE_LZMA=OFF" ;do not use bundled LZMA
431 "-DUSE_LIBZIP=OFF" ;use "zlib" instead
432 (string-append "-DCMAKE_INSTALL_LIBDIR="
433 (assoc-ref %outputs "out") "/lib"))))
434 (native-inputs `(("pkg-config" ,pkg-config)))
435 (inputs `(("ffmpeg" ,ffmpeg)
436 ("imagemagick" ,imagemagick)
438 ("libepoxy" ,libepoxy)
444 ("qtmultimedia" ,qtmultimedia)
449 (home-page "https://mgba.io")
450 (synopsis "Game Boy Advance emulator")
452 "mGBA is an emulator for running Game Boy Advance games. It aims to be
453 faster and more accurate than many existing Game Boy Advance emulators, as
454 well as adding features that other emulators lack. It also supports Game Boy
455 and Game Boy Color games.")
456 ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+ and "inih.c" is
458 (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3))))
460 (define-public mupen64plus-core
462 (name "mupen64plus-core")
468 "https://github.com/mupen64plus/mupen64plus-core/archive/"
470 (file-name (string-append name "-" version ".tar.gz"))
472 (base32 "0dg2hksm5qni2hcha93k7n4fqr92888p946f7phb0ndschzfh9kk"))))
473 (build-system gnu-build-system)
475 `(("pkg-config" ,pkg-config)
478 `(("freetype" ,freetype)
486 (modify-phases %standard-phases
487 ;; The mupen64plus build system has no configure phase.
489 ;; Makefile is in a subdirectory.
491 'build 'cd-to-project-dir
493 (chdir "projects/unix"))))
494 #:make-flags (let ((out (assoc-ref %outputs "out")))
495 (list "all" (string-append "PREFIX=" out)))
496 ;; There are no tests.
498 ;; As per the Makefile (in projects/unix/Makefile):
499 (supported-systems '("i686-linux" "x86_64-linux"))
500 (home-page "http://www.mupen64plus.org/")
501 (synopsis "Nintendo 64 emulator core library")
503 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
504 which is capable of accurately playing many games. This package contains the
506 (license license:gpl2+)))
508 (define-public mupen64plus-audio-sdl
510 (name "mupen64plus-audio-sdl")
516 "https://github.com/mupen64plus/mupen64plus-audio-sdl/archive/"
518 (file-name (string-append name "-" version ".tar.gz"))
520 (base32 "0ss6w92n2rpfnazhg9lbq0nvs3fqx93nliz3k3wjxdlx4dpi7h3a"))))
521 (build-system gnu-build-system)
523 `(("pkg-config" ,pkg-config)
526 `(("mupen64plus-core" ,mupen64plus-core)
530 (modify-phases %standard-phases
531 ;; The mupen64plus build system has no configure phase.
533 ;; Makefile is in a subdirectory.
535 'build 'cd-to-project-dir
537 (chdir "projects/unix"))))
539 (let ((out (assoc-ref %outputs "out"))
540 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
542 (string-append "PREFIX=" out)
543 (string-append "APIDIR=" m64p "/include/mupen64plus")))
544 ;; There are no tests.
546 (home-page "http://www.mupen64plus.org/")
547 (synopsis "Mupen64Plus SDL input plugin")
549 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
550 which is capable of accurately playing many games. This package contains the
552 (license license:gpl2+)))
554 (define-public mupen64plus-input-sdl
556 (name "mupen64plus-input-sdl")
562 "https://github.com/mupen64plus/mupen64plus-input-sdl/archive/"
564 (file-name (string-append name "-" version ".tar.gz"))
566 (base32 "11sj5dbalp2nrlmki34vy7wy28vc175pnnkdk65p8599hnyq37ri"))))
567 (build-system gnu-build-system)
571 `(("mupen64plus-core" ,mupen64plus-core)
575 (modify-phases %standard-phases
576 ;; The mupen64plus build system has no configure phase.
578 ;; Makefile is in a subdirectory.
580 'build 'cd-to-project-dir
582 (chdir "projects/unix"))))
584 (let ((out (assoc-ref %outputs "out"))
585 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
587 (string-append "PREFIX=" out)
588 (string-append "APIDIR=" m64p "/include/mupen64plus")))
589 ;; There are no tests.
591 (home-page "http://www.mupen64plus.org/")
592 (synopsis "Mupen64Plus SDL input plugin")
594 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
595 which is capable of accurately playing many games. This package contains the
597 (license license:gpl2+)))
599 (define-public mupen64plus-rsp-hle
601 (name "mupen64plus-rsp-hle")
607 "https://github.com/mupen64plus/mupen64plus-rsp-hle/archive/"
609 (file-name (string-append name "-" version ".tar.gz"))
611 (base32 "15h7mgz6xd2zjzm6l3f96sbs8kwr3xvbwzgikhnka79m6c69hsxv"))))
612 (build-system gnu-build-system)
614 `(("mupen64plus-core" ,mupen64plus-core)))
617 (modify-phases %standard-phases
618 ;; The mupen64plus build system has no configure phase.
620 ;; Makefile is in a subdirectory.
622 'build 'cd-to-project-dir
624 (chdir "projects/unix"))))
626 (let ((out (assoc-ref %outputs "out"))
627 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
629 (string-append "PREFIX=" out)
630 (string-append "APIDIR=" m64p "/include/mupen64plus")))
631 ;; There are no tests.
633 (home-page "http://www.mupen64plus.org/")
634 (synopsis "Mupen64Plus SDL input plugin")
636 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
637 which is capable of accurately playing many games. This package contains the
638 high-level emulation (HLE) RSP processor plugin.")
639 (license license:gpl2+)))
641 (define-public mupen64plus-rsp-z64
643 (name "mupen64plus-rsp-z64")
649 "https://github.com/mupen64plus/mupen64plus-rsp-z64/archive/"
651 (file-name (string-append name "-" version ".tar.gz"))
653 (base32 "10jz1w2dhx5slhyk4m8mdqlpsd6cshchslr1fckb2ayzb1ls3ghi"))))
654 (build-system gnu-build-system)
656 `(("mupen64plus-core" ,mupen64plus-core)))
659 (modify-phases %standard-phases
660 ;; The mupen64plus build system has no configure phase.
662 ;; Makefile is in a subdirectory.
664 'build 'cd-to-project-dir
666 (chdir "projects/unix"))))
668 (let ((out (assoc-ref %outputs "out"))
669 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
671 (string-append "PREFIX=" out)
672 (string-append "APIDIR=" m64p "/include/mupen64plus")))
673 ;; There are no tests.
675 (home-page "http://www.mupen64plus.org/")
676 (synopsis "Mupen64Plus SDL input plugin")
678 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
679 which is capable of accurately playing many games. This package contains the
680 Z64 RSP processor plugin.")
681 (license license:gpl2+)))
683 (define-public mupen64plus-video-arachnoid
685 (name "mupen64plus-video-arachnoid")
691 "https://github.com/mupen64plus/mupen64plus-video-arachnoid/archive/"
693 (file-name (string-append name "-" version ".tar.gz"))
695 (base32 "0jjwf144rihznm4lnqbhgigxw664v3v32wy94adaa6imk8z6gslh"))))
696 (build-system gnu-build-system)
698 `(("pkg-config" ,pkg-config)
702 ("mupen64plus-core" ,mupen64plus-core)))
705 (modify-phases %standard-phases
706 ;; The mupen64plus build system has no configure phase.
708 ;; Makefile is in a subdirectory.
710 'build 'cd-to-project-dir
712 (chdir "projects/unix"))))
714 (let ((out (assoc-ref %outputs "out"))
715 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
717 (string-append "PREFIX=" out)
718 (string-append "APIDIR=" m64p "/include/mupen64plus")))
719 ;; There are no tests.
721 (home-page "http://www.mupen64plus.org/")
722 (synopsis "Mupen64Plus Rice Video plugin")
724 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
725 which is capable of accurately playing many games. This package contains the
726 Arachnoid video plugin.")
727 (license license:gpl2+)))
729 (define-public mupen64plus-video-glide64
731 (name "mupen64plus-video-glide64")
737 "https://github.com/mupen64plus/mupen64plus-video-glide64/archive/"
739 (file-name (string-append name "-" version ".tar.gz"))
741 (base32 "1rm55dbf6xgsq1blbzs6swa2ajv0qkn38acbljj346abnk6s3dla"))))
742 (build-system gnu-build-system)
744 `(("pkg-config" ,pkg-config)
748 ("mupen64plus-core" ,mupen64plus-core)
752 (modify-phases %standard-phases
753 ;; The mupen64plus build system has no configure phase.
755 ;; Makefile is in a subdirectory.
757 'build 'cd-to-project-dir
759 (chdir "projects/unix")))
760 ;; XXX Should be unnecessary with the next release.
764 (substitute* "Makefile"
765 (("SDL_CONFIG = (.*)sdl-config" all prefix)
766 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
768 (let ((out (assoc-ref %outputs "out"))
769 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
771 (string-append "PREFIX=" out)
772 (string-append "APIDIR=" m64p "/include/mupen64plus")))
773 ;; There are no tests.
775 (home-page "http://www.mupen64plus.org/")
776 (synopsis "Mupen64Plus Rice Video plugin")
778 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
779 which is capable of accurately playing many games. This package contains the
780 Glide64 video plugin.")
781 (license license:gpl2+)))
783 (define-public mupen64plus-video-glide64mk2
785 (name "mupen64plus-video-glide64mk2")
791 "https://github.com/mupen64plus/mupen64plus-video-glide64mk2/archive/"
793 (file-name (string-append name "-" version ".tar.gz"))
795 (base32 "1ihl4q293d6svba26b4mhapjcdg12p90gibz79b4mx423jlcxxj9"))))
796 (build-system gnu-build-system)
798 `(("pkg-config" ,pkg-config)
804 ("mupen64plus-core" ,mupen64plus-core)
809 (modify-phases %standard-phases
810 ;; The mupen64plus build system has no configure phase.
812 ;; Makefile is in a subdirectory.
814 'build 'cd-to-project-dir
816 (chdir "projects/unix"))))
818 (let ((out (assoc-ref %outputs "out"))
819 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
821 (string-append "PREFIX=" out)
822 (string-append "APIDIR=" m64p "/include/mupen64plus")))
823 ;; There are no tests.
825 (home-page "http://www.mupen64plus.org/")
826 (synopsis "Mupen64Plus Rice Video plugin")
828 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
829 which is capable of accurately playing many games. This package contains the
830 Glide64MK2 video plugin.")
831 (license license:gpl2+)))
833 (define-public mupen64plus-video-rice
835 (name "mupen64plus-video-rice")
841 "https://github.com/mupen64plus/mupen64plus-video-rice/archive/"
843 (file-name (string-append name "-" version ".tar.gz"))
845 (base32 "0rd2scjmh285w61aj3mgx71whg5rqrjbry3cdgicczrnyvf8wdvk"))))
846 (build-system gnu-build-system)
848 `(("pkg-config" ,pkg-config)
853 ("mupen64plus-core" ,mupen64plus-core)
857 (modify-phases %standard-phases
858 ;; The mupen64plus build system has no configure phase.
860 ;; Makefile is in a subdirectory.
862 'build 'cd-to-project-dir
864 (chdir "projects/unix"))))
866 (let ((out (assoc-ref %outputs "out"))
867 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
869 (string-append "PREFIX=" out)
870 (string-append "APIDIR=" m64p "/include/mupen64plus")))
871 ;; There are no tests.
873 (home-page "http://www.mupen64plus.org/")
874 (synopsis "Mupen64Plus Rice Video plugin")
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
879 (license license:gpl2+)))
881 (define-public mupen64plus-video-z64
883 (name "mupen64plus-video-z64")
889 "https://github.com/mupen64plus/mupen64plus-video-z64/archive/"
891 (file-name (string-append name "-" version ".tar.gz"))
893 (base32 "1x7wsjs5gx2iwx20p4cjcbf696zsjlh31qxmghwv0ifrq8x58s1b"))
894 (patches (search-patches "mupen64plus-video-z64-glew-correct-path.patch"))))
895 (build-system gnu-build-system)
897 `(("pkg-config" ,pkg-config)
901 ("mupen64plus-core" ,mupen64plus-core)
905 (modify-phases %standard-phases
906 ;; The mupen64plus build system has no configure phase.
908 ;; Makefile is in a subdirectory.
910 'build 'cd-to-project-dir
912 (chdir "projects/unix")))
913 ;; XXX Should be unnecessary with the next release.
917 (substitute* "Makefile"
918 (("SDL_CONFIG = (.*)sdl-config" all prefix)
919 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
921 (let ((out (assoc-ref %outputs "out"))
922 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
924 (string-append "PREFIX=" out)
925 (string-append "APIDIR=" m64p "/include/mupen64plus")))
926 ;; There are no tests.
928 (home-page "http://www.mupen64plus.org/")
929 (synopsis "Mupen64Plus Z64 video plugin")
931 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
932 which is capable of accurately playing many games. This package contains the
934 (license license:gpl2+)))
936 (define-public mupen64plus-ui-console
938 (name "mupen64plus-ui-console")
944 "https://github.com/mupen64plus/mupen64plus-ui-console/archive/"
946 (file-name (string-append name "-" version ".tar.gz"))
948 (base32 "04qkpd8ic7xsgnqz7spl00wxdygf79m7d1k8rabbygjk5lg6p8z2"))
949 (patches (search-patches "mupen64plus-ui-console-notice.patch"))))
950 (build-system gnu-build-system)
952 `(("pkg-config" ,pkg-config)
956 ;; Mupen64Plus supports a single data directory and a single plugin
957 ;; directory in its configuration, yet we need data and plugin files from
958 ;; a variety of packages. The best way to deal with this is to install
959 ;; all packages from which data and plugin files are needed into one's
960 ;; profile, and point the configuration there. Hence, propagate the most
961 ;; important packages here to save the user from the bother. The patch
962 ;; mupen64plus-ui-console-notice also gives users instructions on what
963 ;; they need to do in order to point the configuration to their profile.
965 `(("mupen64plus-core" ,mupen64plus-core)
966 ("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl)
967 ("mupen64plus-input-sdl" ,mupen64plus-input-sdl)
968 ("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle)
969 ("mupen64plus-video-glide64" ,mupen64plus-video-glide64)
970 ("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2)
971 ("mupen64plus-video-rice" ,mupen64plus-video-rice)))
974 (modify-phases %standard-phases
975 ;; The mupen64plus build system has no configure phase.
977 ;; Makefile is in a subdirectory.
979 'build 'cd-to-project-dir
981 (chdir "projects/unix"))))
983 (let ((out (assoc-ref %outputs "out"))
984 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
986 (string-append "PREFIX=" out)
987 (string-append "APIDIR=" m64p "/include/mupen64plus")
988 ;; Trailing slash matters here.
989 (string-append "COREDIR=" m64p "/lib/")))
990 ;; There are no tests.
992 (home-page "http://www.mupen64plus.org/")
993 (synopsis "Mupen64Plus SDL input plugin")
995 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
996 which is capable of accurately playing many games. This package contains the
997 command line user interface. Installing this package is the easiest way
998 towards a working Mupen64Plus for casual users.")
999 (license license:gpl2+)))
1001 (define-public nestopia-ue
1003 (name "nestopia-ue")
1008 "https://github.com/rdanbrook/nestopia/archive/"
1010 (file-name (string-append name "-" version ".tar.gz"))
1013 "184y05z4k4a4m4022niy625kan0rklh8gcxyynxli1fss2sjjrpv"))
1014 (modules '((guix build utils)))
1017 ;; We don't need libretro for the GNU/Linux build.
1018 (delete-file-recursively "libretro")))))
1019 (build-system cmake-build-system)
1021 `(("pkg-config" ,pkg-config)))
1025 ("libarchive" ,libarchive)
1026 ("libepoxy" ,libepoxy)
1031 (modify-phases %standard-phases
1032 ;; This fixes the file chooser crash that happens with GTK 3.
1033 (add-after 'install 'wrap-program
1034 (lambda* (#:key inputs outputs #:allow-other-keys)
1035 (let* ((out (assoc-ref outputs "out"))
1036 (nestopia (string-append out "/bin/nestopia"))
1037 (gtk (assoc-ref inputs "gtk+"))
1038 (gtk-share (string-append gtk "/share")))
1039 (wrap-program nestopia
1040 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))))))
1041 ;; There are no tests.
1043 (home-page "http://0ldsk00l.ca/nestopia/")
1044 (synopsis "Nintendo Entertainment System (NES/Famicom) emulator")
1046 "Nestopia UE (Undead Edition) is a fork of the Nintendo Entertainment
1047 System (NES/Famicom) emulator Nestopia, with enhancements from members of the
1048 emulation community. It provides highly accurate emulation.")
1049 (license license:gpl2+)))
1051 (define-public retroarch
1058 (uri (string-append "https://github.com/libretro/RetroArch/archive/v"
1060 (file-name (string-append name "-" version ".tar.gz"))
1062 (base32 "1si78dbwbsq4i0r42q94nmlpaxdyqch113nxavdprf4vc1224356"))))
1063 (build-system gnu-build-system)
1065 '(#:tests? #f ; no tests
1067 (modify-phases %standard-phases
1069 (lambda* (#:key inputs outputs #:allow-other-keys)
1070 (let* ((out (assoc-ref outputs "out"))
1071 (etc (string-append out "/etc"))
1072 (vulkan (assoc-ref inputs "vulkan-loader")))
1073 ;; Hard-code the path to libvulkan.so.
1074 (substitute* "gfx/common/vulkan_common.c"
1075 (("libvulkan.so") (string-append vulkan "/lib/libvulkan.so")))
1076 (substitute* "qb/qb.libs.sh"
1077 (("/bin/true") (which "true")))
1078 ;; The configure script does not yet accept the extra arguments
1079 ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase.
1082 (string-append "--prefix=" out)
1083 (string-append "--global-config-dir=" etc)))))))))
1085 `(("alsa-lib" ,alsa-lib)
1087 ("freetype" ,freetype)
1088 ("libxinerama" ,libxinerama)
1089 ("libxkbcommon" ,libxkbcommon)
1090 ("libxml2" ,libxml2)
1094 ("pulseaudio" ,pulseaudio)
1099 ("vulkan-loader" ,vulkan-loader)
1100 ("wayland" ,wayland)
1103 `(("pkg-config" ,pkg-config)
1105 (home-page "https://www.libretro.com/")
1106 (synopsis "Reference frontend for the libretro API")
1108 "Libretro is a simple but powerful development interface that allows for
1109 the easy creation of emulators, games and multimedia applications that can plug
1110 straight into any libretro-compatible frontend. RetroArch is the official
1111 reference frontend for the libretro API, currently used by most as a modular
1112 multi-system game/emulator system.")
1113 (license license:gpl3+)))
1115 (define-public scummvm
1122 (uri (string-append "http://www.scummvm.org/frs/scummvm/" version
1123 "/scummvm-" version ".tar.xz"))
1126 "0q6aiw97wsrf8cjw9vjilzhqqsr2rw2lll99s8i5i9svan6l314p"))))
1127 (build-system gnu-build-system)
1129 `(#:tests? #f ;require "git"
1130 #:configure-flags (list "--enable-release") ;for optimizations
1132 (modify-phases %standard-phases
1134 ;; configure does not work followed by both "SHELL=..." and
1135 ;; "CONFIG_SHELL=..."; set environment variables instead
1136 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1137 (let* ((out (assoc-ref outputs "out"))
1138 (bash (which "bash"))
1139 (flags `(,(string-append "--prefix=" out)
1140 ,@configure-flags)))
1141 (setenv "SHELL" bash)
1142 (setenv "CONFIG_SHELL" bash)
1143 (apply invoke "./configure" flags)))))))
1145 `(("pkg-config" ,pkg-config)))
1147 `(("alsa-lib" ,alsa-lib)
1149 ("fluidsynth" ,fluidsynth)
1150 ("freetype" ,freetype)
1152 ("libjpeg-turbo" ,libjpeg-turbo)
1154 ("libmpeg2" ,libmpeg2)
1157 ("libtheora" ,libtheora)
1158 ("libvorbis" ,libvorbis)
1162 (home-page "https://www.scummvm.org/")
1163 (synopsis "Engine for several graphical adventure games")
1164 (description "ScummVM is a program which allows you to run certain
1165 classic graphical point-and-click adventure games, provided you
1166 already have their data files. The clever part about this: ScummVM
1167 just replaces the executables shipped with the games, allowing you to
1168 play them on systems for which they were never designed!")
1169 (license license:gpl2+)))