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>
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 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))
75 (define-public desmume
83 "mirror://sourceforge/desmume/desmume/"
84 version "/desmume-" version ".tar.gz"))
87 "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs"))))
88 (build-system gnu-build-system)
90 ;; Enable support for WiFi and microphone.
91 `(#:configure-flags '("--enable-wifi"
94 `(("pkg-config" ,pkg-config)
95 ("intltool" ,intltool)))
102 (home-page "http://desmume.org/")
103 (synopsis "Nintendo DS emulator")
105 "DeSmuME is an emulator for the Nintendo DS handheld gaming console.")
106 (license license:gpl2)))
108 ;; Building from recent Git because the official 5.0 release no longer builds.
109 (define-public dolphin-emu
110 (let ((commit "d04b179111f8d863f360839474cb82c766f762b8")
114 (version (git-version "5.0" revision commit))
119 (url "https://github.com/dolphin-emu/dolphin.git")
121 (file-name (git-file-name name version))
122 (modules '((guix build utils)))
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"))
133 (for-each delete-file (find-files "." ".*\\.(bin|dsy|exe|jar|rar)$"))
137 "0g725wmhlim73zrhi47wmr1bmplpy4b7sbimd5pm8xpfhj5nm10l"))))
138 (build-system cmake-build-system)
141 ;; The FindGTK2 cmake script only checks hardcoded directories for
145 (modify-phases %standard-phases
146 (add-before 'configure 'generate-fonts&hardcore-libvulkan-path
147 (lambda* (#:key inputs outputs #:allow-other-keys)
149 (string-append (assoc-ref inputs "font-wqy-microhei")
150 "/share/fonts/truetype/wqy-microhei.ttc"))
152 (string-append (assoc-ref inputs "vulkan-icd-loader")
153 "/lib/libvulkan.so")))
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")
162 (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp"
163 (("libvulkan.so") libvulkan))
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")
176 (string-append "-DX11_LIBRARIES="
177 (assoc-ref %build-inputs "libx11")
181 `(("pkg-config" ,pkg-config)
182 ("gettext" ,gnu-gettext)))
184 `(("alsa-lib" ,alsa-lib)
190 ("font-wqy-microhei" ,font-wqy-microhei)
191 ("freetype" ,freetype)
197 ("libevdev" ,libevdev)
202 ("libxrandr" ,libxrandr)
204 ("mbedtls-apache" ,mbedtls-apache)
206 ("miniupnpc" ,miniupnpc)
208 ("pulseaudio" ,pulseaudio)
213 ("soundtouch" ,soundtouch)
214 ("vulkan-icd-loader" ,vulkan-icd-loader)
215 ("wxwidgets" ,wxwidgets-gtk2-3.1)
217 (home-page "https://dolphin-emu.org/")
218 (synopsis "Nintendo Wii and GameCube emulator")
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+)))))
227 (define-public dosbox
230 (version "0.74.svn3947")
234 (url "http://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk/")
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>).
242 "1p918j6090d1nkvgq7ifvmn506zrdmyi32y7p3ms40d5ssqjg8fj"))))
243 (build-system gnu-build-system)
245 `(#:phases (modify-phases %standard-phases
249 (zero? (system* "sh" "autogen.sh")))))))
251 `(("autoconf" ,autoconf)
252 ("automake" ,automake)))
257 ("alsa-lib" ,alsa-lib)
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
267 (license license:gpl2+)))
269 (define-public emulation-station
270 (let ((commit "646bede3d9ec0acf0ae378415edac136774a66c5"))
272 (name "emulation-station")
275 (method git-fetch) ; no tarball available
277 (url "https://github.com/Aloshi/EmulationStation.git")
278 (commit commit))) ; no version tag
279 (file-name (string-append name "-" version "-checkout"))
282 "0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v"))))
283 (build-system cmake-build-system)
285 '(#:tests? #f)) ; no tests
287 `(("alsa-lib" ,alsa-lib)
291 ("freeimage" ,freeimage)
292 ("freetype" ,freetype)
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))))
311 "https://gitlab.com/higan/higan/repository/archive.tar.gz?ref=v"
313 (file-name (string-append name "-" version ".tar.gz"))
315 (base32 "0y42pra0dxzlbkyzcp3r8a39pji2bj3p9fl40425f60af2igr4rw"))
316 (patches (search-patches "higan-remove-march-native-flag.patch"))))
317 (build-system gnu-build-system)
319 `(("pkg-config" ,pkg-config)))
321 `(("alsa-lib" ,alsa-lib)
325 ("gtksourceview-2" ,gtksourceview-2)
329 ("pulseaudio" ,pulseaudio)
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.
338 (add-before 'build 'chdir-to-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
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")
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
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))))
377 ;; Second, make sure higan will find icarus in PATH.
379 `("PATH" ":" prefix (,bin))))))))
382 (string-append "prefix=" (assoc-ref %outputs "out")))
383 ;; There is no test suite.
385 (home-page "http://byuu.org/emulation/higan/")
386 (synopsis "Nintendo multi-system emulator")
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)))
404 (uri (string-append "https://github.com/mgba-emu/mgba/archive/"
406 (file-name (string-append name "-" version ".tar.gz"))
409 "16hgs6r5iym3lp2cjcnv9955333976yc5sgy2kkxlsi005n91j1m"))
410 (modules '((guix build utils)))
412 ;; Make sure we don't use the bundled software.
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)
420 `(#:tests? #f ;no "test" target
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)
430 ("libepoxy" ,libepoxy)
436 ("qtmultimedia" ,qtmultimedia)
441 (home-page "https://mgba.io")
442 (synopsis "Game Boy Advance emulator")
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
450 (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3))))
452 (define-public mupen64plus-core
454 (name "mupen64plus-core")
460 "https://github.com/mupen64plus/mupen64plus-core/archive/"
462 (file-name (string-append name "-" version ".tar.gz"))
464 (base32 "0dg2hksm5qni2hcha93k7n4fqr92888p946f7phb0ndschzfh9kk"))))
465 (build-system gnu-build-system)
467 `(("pkg-config" ,pkg-config)
470 `(("freetype" ,freetype)
478 (modify-phases %standard-phases
479 ;; The mupen64plus build system has no configure phase.
481 ;; Makefile is in a subdirectory.
483 'build 'cd-to-project-dir
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.
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")
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
498 (license license:gpl2+)))
500 (define-public mupen64plus-audio-sdl
502 (name "mupen64plus-audio-sdl")
508 "https://github.com/mupen64plus/mupen64plus-audio-sdl/archive/"
510 (file-name (string-append name "-" version ".tar.gz"))
512 (base32 "0ss6w92n2rpfnazhg9lbq0nvs3fqx93nliz3k3wjxdlx4dpi7h3a"))))
513 (build-system gnu-build-system)
515 `(("pkg-config" ,pkg-config)
518 `(("mupen64plus-core" ,mupen64plus-core)
522 (modify-phases %standard-phases
523 ;; The mupen64plus build system has no configure phase.
525 ;; Makefile is in a subdirectory.
527 'build 'cd-to-project-dir
529 (chdir "projects/unix"))))
531 (let ((out (assoc-ref %outputs "out"))
532 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
534 (string-append "PREFIX=" out)
535 (string-append "APIDIR=" m64p "/include/mupen64plus")))
536 ;; There are no tests.
538 (home-page "http://www.mupen64plus.org/")
539 (synopsis "Mupen64Plus SDL input plugin")
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
544 (license license:gpl2+)))
546 (define-public mupen64plus-input-sdl
548 (name "mupen64plus-input-sdl")
554 "https://github.com/mupen64plus/mupen64plus-input-sdl/archive/"
556 (file-name (string-append name "-" version ".tar.gz"))
558 (base32 "11sj5dbalp2nrlmki34vy7wy28vc175pnnkdk65p8599hnyq37ri"))))
559 (build-system gnu-build-system)
563 `(("mupen64plus-core" ,mupen64plus-core)
567 (modify-phases %standard-phases
568 ;; The mupen64plus build system has no configure phase.
570 ;; Makefile is in a subdirectory.
572 'build 'cd-to-project-dir
574 (chdir "projects/unix"))))
576 (let ((out (assoc-ref %outputs "out"))
577 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
579 (string-append "PREFIX=" out)
580 (string-append "APIDIR=" m64p "/include/mupen64plus")))
581 ;; There are no tests.
583 (home-page "http://www.mupen64plus.org/")
584 (synopsis "Mupen64Plus SDL input plugin")
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
589 (license license:gpl2+)))
591 (define-public mupen64plus-rsp-hle
593 (name "mupen64plus-rsp-hle")
599 "https://github.com/mupen64plus/mupen64plus-rsp-hle/archive/"
601 (file-name (string-append name "-" version ".tar.gz"))
603 (base32 "15h7mgz6xd2zjzm6l3f96sbs8kwr3xvbwzgikhnka79m6c69hsxv"))))
604 (build-system gnu-build-system)
606 `(("mupen64plus-core" ,mupen64plus-core)))
609 (modify-phases %standard-phases
610 ;; The mupen64plus build system has no configure phase.
612 ;; Makefile is in a subdirectory.
614 'build 'cd-to-project-dir
616 (chdir "projects/unix"))))
618 (let ((out (assoc-ref %outputs "out"))
619 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
621 (string-append "PREFIX=" out)
622 (string-append "APIDIR=" m64p "/include/mupen64plus")))
623 ;; There are no tests.
625 (home-page "http://www.mupen64plus.org/")
626 (synopsis "Mupen64Plus SDL input plugin")
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+)))
633 (define-public mupen64plus-rsp-z64
635 (name "mupen64plus-rsp-z64")
641 "https://github.com/mupen64plus/mupen64plus-rsp-z64/archive/"
643 (file-name (string-append name "-" version ".tar.gz"))
645 (base32 "10jz1w2dhx5slhyk4m8mdqlpsd6cshchslr1fckb2ayzb1ls3ghi"))))
646 (build-system gnu-build-system)
648 `(("mupen64plus-core" ,mupen64plus-core)))
651 (modify-phases %standard-phases
652 ;; The mupen64plus build system has no configure phase.
654 ;; Makefile is in a subdirectory.
656 'build 'cd-to-project-dir
658 (chdir "projects/unix"))))
660 (let ((out (assoc-ref %outputs "out"))
661 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
663 (string-append "PREFIX=" out)
664 (string-append "APIDIR=" m64p "/include/mupen64plus")))
665 ;; There are no tests.
667 (home-page "http://www.mupen64plus.org/")
668 (synopsis "Mupen64Plus SDL input plugin")
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+)))
675 (define-public mupen64plus-video-arachnoid
677 (name "mupen64plus-video-arachnoid")
683 "https://github.com/mupen64plus/mupen64plus-video-arachnoid/archive/"
685 (file-name (string-append name "-" version ".tar.gz"))
687 (base32 "0jjwf144rihznm4lnqbhgigxw664v3v32wy94adaa6imk8z6gslh"))))
688 (build-system gnu-build-system)
690 `(("pkg-config" ,pkg-config)
694 ("mupen64plus-core" ,mupen64plus-core)))
697 (modify-phases %standard-phases
698 ;; The mupen64plus build system has no configure phase.
700 ;; Makefile is in a subdirectory.
702 'build 'cd-to-project-dir
704 (chdir "projects/unix"))))
706 (let ((out (assoc-ref %outputs "out"))
707 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
709 (string-append "PREFIX=" out)
710 (string-append "APIDIR=" m64p "/include/mupen64plus")))
711 ;; There are no tests.
713 (home-page "http://www.mupen64plus.org/")
714 (synopsis "Mupen64Plus Rice Video plugin")
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+)))
721 (define-public mupen64plus-video-glide64
723 (name "mupen64plus-video-glide64")
729 "https://github.com/mupen64plus/mupen64plus-video-glide64/archive/"
731 (file-name (string-append name "-" version ".tar.gz"))
733 (base32 "1rm55dbf6xgsq1blbzs6swa2ajv0qkn38acbljj346abnk6s3dla"))))
734 (build-system gnu-build-system)
736 `(("pkg-config" ,pkg-config)
740 ("mupen64plus-core" ,mupen64plus-core)
744 (modify-phases %standard-phases
745 ;; The mupen64plus build system has no configure phase.
747 ;; Makefile is in a subdirectory.
749 'build 'cd-to-project-dir
751 (chdir "projects/unix")))
752 ;; XXX Should be unnecessary with the next release.
756 (substitute* "Makefile"
757 (("SDL_CONFIG = (.*)sdl-config" all prefix)
758 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
760 (let ((out (assoc-ref %outputs "out"))
761 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
763 (string-append "PREFIX=" out)
764 (string-append "APIDIR=" m64p "/include/mupen64plus")))
765 ;; There are no tests.
767 (home-page "http://www.mupen64plus.org/")
768 (synopsis "Mupen64Plus Rice Video plugin")
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+)))
775 (define-public mupen64plus-video-glide64mk2
777 (name "mupen64plus-video-glide64mk2")
783 "https://github.com/mupen64plus/mupen64plus-video-glide64mk2/archive/"
785 (file-name (string-append name "-" version ".tar.gz"))
787 (base32 "1ihl4q293d6svba26b4mhapjcdg12p90gibz79b4mx423jlcxxj9"))))
788 (build-system gnu-build-system)
790 `(("pkg-config" ,pkg-config)
796 ("mupen64plus-core" ,mupen64plus-core)
801 (modify-phases %standard-phases
802 ;; The mupen64plus build system has no configure phase.
804 ;; Makefile is in a subdirectory.
806 'build 'cd-to-project-dir
808 (chdir "projects/unix"))))
810 (let ((out (assoc-ref %outputs "out"))
811 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
813 (string-append "PREFIX=" out)
814 (string-append "APIDIR=" m64p "/include/mupen64plus")))
815 ;; There are no tests.
817 (home-page "http://www.mupen64plus.org/")
818 (synopsis "Mupen64Plus Rice Video plugin")
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+)))
825 (define-public mupen64plus-video-rice
827 (name "mupen64plus-video-rice")
833 "https://github.com/mupen64plus/mupen64plus-video-rice/archive/"
835 (file-name (string-append name "-" version ".tar.gz"))
837 (base32 "0rd2scjmh285w61aj3mgx71whg5rqrjbry3cdgicczrnyvf8wdvk"))))
838 (build-system gnu-build-system)
840 `(("pkg-config" ,pkg-config)
845 ("mupen64plus-core" ,mupen64plus-core)
849 (modify-phases %standard-phases
850 ;; The mupen64plus build system has no configure phase.
852 ;; Makefile is in a subdirectory.
854 'build 'cd-to-project-dir
856 (chdir "projects/unix"))))
858 (let ((out (assoc-ref %outputs "out"))
859 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
861 (string-append "PREFIX=" out)
862 (string-append "APIDIR=" m64p "/include/mupen64plus")))
863 ;; There are no tests.
865 (home-page "http://www.mupen64plus.org/")
866 (synopsis "Mupen64Plus Rice Video plugin")
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
871 (license license:gpl2+)))
873 (define-public mupen64plus-video-z64
875 (name "mupen64plus-video-z64")
881 "https://github.com/mupen64plus/mupen64plus-video-z64/archive/"
883 (file-name (string-append name "-" version ".tar.gz"))
885 (base32 "1x7wsjs5gx2iwx20p4cjcbf696zsjlh31qxmghwv0ifrq8x58s1b"))
886 (patches (search-patches "mupen64plus-video-z64-glew-correct-path.patch"))))
887 (build-system gnu-build-system)
889 `(("pkg-config" ,pkg-config)
893 ("mupen64plus-core" ,mupen64plus-core)
897 (modify-phases %standard-phases
898 ;; The mupen64plus build system has no configure phase.
900 ;; Makefile is in a subdirectory.
902 'build 'cd-to-project-dir
904 (chdir "projects/unix")))
905 ;; XXX Should be unnecessary with the next release.
909 (substitute* "Makefile"
910 (("SDL_CONFIG = (.*)sdl-config" all prefix)
911 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
913 (let ((out (assoc-ref %outputs "out"))
914 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
916 (string-append "PREFIX=" out)
917 (string-append "APIDIR=" m64p "/include/mupen64plus")))
918 ;; There are no tests.
920 (home-page "http://www.mupen64plus.org/")
921 (synopsis "Mupen64Plus Z64 video plugin")
923 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
924 which is capable of accurately playing many games. This package contains the
926 (license license:gpl2+)))
928 (define-public mupen64plus-ui-console
930 (name "mupen64plus-ui-console")
936 "https://github.com/mupen64plus/mupen64plus-ui-console/archive/"
938 (file-name (string-append name "-" version ".tar.gz"))
940 (base32 "04qkpd8ic7xsgnqz7spl00wxdygf79m7d1k8rabbygjk5lg6p8z2"))
941 (patches (search-patches "mupen64plus-ui-console-notice.patch"))))
942 (build-system gnu-build-system)
944 `(("pkg-config" ,pkg-config)
948 ;; Mupen64Plus supports a single data directory and a single plugin
949 ;; directory in its configuration, yet we need data and plugin files from
950 ;; a variety of packages. The best way to deal with this is to install
951 ;; all packages from which data and plugin files are needed into one's
952 ;; profile, and point the configuration there. Hence, propagate the most
953 ;; important packages here to save the user from the bother. The patch
954 ;; mupen64plus-ui-console-notice also gives users instructions on what
955 ;; they need to do in order to point the configuration to their profile.
957 `(("mupen64plus-core" ,mupen64plus-core)
958 ("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl)
959 ("mupen64plus-input-sdl" ,mupen64plus-input-sdl)
960 ("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle)
961 ("mupen64plus-video-glide64" ,mupen64plus-video-glide64)
962 ("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2)
963 ("mupen64plus-video-rice" ,mupen64plus-video-rice)))
966 (modify-phases %standard-phases
967 ;; The mupen64plus build system has no configure phase.
969 ;; Makefile is in a subdirectory.
971 'build 'cd-to-project-dir
973 (chdir "projects/unix"))))
975 (let ((out (assoc-ref %outputs "out"))
976 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
978 (string-append "PREFIX=" out)
979 (string-append "APIDIR=" m64p "/include/mupen64plus")
980 ;; Trailing slash matters here.
981 (string-append "COREDIR=" m64p "/lib/")))
982 ;; There are no tests.
984 (home-page "http://www.mupen64plus.org/")
985 (synopsis "Mupen64Plus SDL input plugin")
987 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
988 which is capable of accurately playing many games. This package contains the
989 command line user interface. Installing this package is the easiest way
990 towards a working Mupen64Plus for casual users.")
991 (license license:gpl2+)))
993 (define-public nestopia-ue
1000 "https://github.com/rdanbrook/nestopia/archive/"
1002 (file-name (string-append name "-" version ".tar.gz"))
1005 "1dzrrjmvyqks64q5l5pfly80jb6qcsbj5b3dm40fijd5xnpbapci"))
1006 (modules '((guix build utils)))
1009 ;; We don't need libretro for the GNU/Linux build.
1010 (delete-file-recursively "libretro")
1012 (delete-file-recursively "source/zlib")
1013 (substitute* "source/core/NstZlib.cpp"
1014 (("#include \"../zlib/zlib.h\"") "#include <zlib.h>"))))))
1015 (build-system gnu-build-system)
1017 `(("pkg-config" ,pkg-config)))
1022 ("libarchive" ,libarchive)
1028 (modify-phases %standard-phases
1029 ;; The Nestopia build system consists solely of a Makefile.
1031 (add-before 'build 'remove-xdg-desktop-menu-call
1033 (substitute* "Makefile"
1034 (("xdg-desktop-menu install .*") ""))))
1035 (add-before 'build 'remove-gdkwayland-include
1037 (substitute* "source/unix/gtkui/gtkui.h"
1038 (("#include <gdk/gdkwayland\\.h>") "")))))
1039 #:make-flags (let ((out (assoc-ref %outputs "out")))
1040 (list "CC=gcc" "CXX=g++" (string-append "PREFIX=" out)))
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 "1wykv0w0kdlh7lh0k1ig0lpk5vh4c7r19jlfa9103jmjlryrq679"))))
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-icd-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)
1098 ("vulkan-icd-loader" ,vulkan-icd-loader)
1099 ("wayland" ,wayland)
1102 `(("pkg-config" ,pkg-config)
1104 (home-page "https://www.libretro.com/")
1105 (synopsis "Reference frontend for the libretro API")
1107 "Libretro is a simple but powerful development interface that allows for
1108 the easy creation of emulators, games and multimedia applications that can plug
1109 straight into any libretro-compatible frontend. RetroArch is the official
1110 reference frontend for the libretro API, currently used by most as a modular
1111 multi-system game/emulator system.")
1112 (license license:gpl3+)))