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, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
10 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2017, 2018, 2019 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 elf)
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 lua)
60 #:use-module (gnu packages maths)
61 #:use-module (gnu packages mp3)
62 #:use-module (gnu packages music)
63 #:use-module (gnu packages ncurses)
64 #:use-module (gnu packages networking)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages pulseaudio)
67 #:use-module (gnu packages python)
68 #:use-module (gnu packages qt)
69 #:use-module (gnu packages sdl)
70 #:use-module (gnu packages sphinx)
71 #:use-module (gnu packages sqlite)
72 #:use-module (gnu packages texinfo)
73 #:use-module (gnu packages textutils)
74 #:use-module (gnu packages tls)
75 #:use-module (gnu packages upnp)
76 #:use-module (gnu packages video)
77 #:use-module (gnu packages vulkan)
78 #:use-module (gnu packages wxwidgets)
79 #:use-module (gnu packages xdisorg)
80 #:use-module (gnu packages xiph)
81 #:use-module (gnu packages xml)
82 #:use-module (gnu packages xorg)
83 #:use-module (gnu packages web)
84 #:use-module (guix build-system cmake)
85 #:use-module (guix build-system gnu))
87 (define-public desmume
95 "mirror://sourceforge/desmume/desmume/"
96 version "/desmume-" version ".tar.gz"))
99 "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs"))))
100 (build-system gnu-build-system)
102 ;; Enable support for WiFi and microphone.
103 `(#:configure-flags '("--enable-wifi"
106 `(("pkg-config" ,pkg-config)
107 ("intltool" ,intltool)))
114 (home-page "http://desmume.org/")
115 (synopsis "Nintendo DS emulator")
117 "DeSmuME is an emulator for the Nintendo DS handheld gaming console.")
118 (license license:gpl2)))
120 ;; Building from recent Git because the official 5.0 release no longer builds.
121 (define-public dolphin-emu
122 (let ((commit "24718c1a389e4f51db974575cd15c372485b92e2")
126 (version (git-version "5.0" revision commit))
131 (url "https://github.com/dolphin-emu/dolphin.git")
133 (file-name (git-file-name name version))
134 (modules '((guix build utils)))
137 ;; Remove external stuff we don't need.
138 (for-each (lambda (dir)
139 (delete-file-recursively
140 (string-append "Externals/" dir)))
141 '("LZO" "OpenAL" "Qt" "SFML" "curl" "ffmpeg"
142 "gettext" "hidapi" "libpng" "libusb" "mbedtls"
145 (for-each delete-file (find-files "." ".*\\.(bin|dsy|exe|jar|rar)$"))
149 "1d92rhnw307j3m6swk6bycb8fyc7vw2hfgakd5hpsc4qw65vxfq8"))))
150 (build-system cmake-build-system)
154 (modify-phases %standard-phases
155 (add-before 'configure 'fixgcc7
157 (unsetenv "C_INCLUDE_PATH")
158 (unsetenv "CPLUS_INCLUDE_PATH")
160 (add-before 'configure 'generate-fonts&hardcore-libvulkan-path
161 (lambda* (#:key inputs outputs #:allow-other-keys)
163 (string-append (assoc-ref inputs "font-wqy-microhei")
164 "/share/fonts/truetype/wqy-microhei.ttc"))
166 (string-append (assoc-ref inputs "vulkan-loader")
167 "/lib/libvulkan.so")))
169 (invoke "bash" "-c" "g++ -O2 -std=c++11 $(freetype-config \
170 --cflags --libs) gc-font-tool.cpp -o gc-font-tool")
171 (invoke "./gc-font-tool" "a" fontfile "font_western.bin")
172 (invoke "./gc-font-tool" "s" fontfile "font_japanese.bin")
173 (copy-file "font_japanese.bin" "../Data/Sys/GC/font_japanese.bin")
174 (copy-file "font_western.bin" "../Data/Sys/GC/font_western.bin")
176 (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp"
177 (("libvulkan.so") libvulkan))
180 ;; The FindGTK2 cmake script only checks hardcoded directories for
184 (list (string-append "-DX11_INCLUDE_DIR="
185 (assoc-ref %build-inputs "libx11")
187 (string-append "-DX11_LIBRARIES="
188 (assoc-ref %build-inputs "libx11")
192 `(("pkg-config" ,pkg-config)
193 ("gcc" ,gcc-7) ; Building with gcc@5 doesn't work anymore.
194 ("gettext" ,gnu-gettext)))
196 `(("alsa-lib" ,alsa-lib)
202 ("font-wqy-microhei" ,font-wqy-microhei)
203 ("freetype" ,freetype)
209 ("libevdev" ,libevdev)
214 ("libxrandr" ,libxrandr)
216 ("mbedtls-apache" ,mbedtls-apache)
218 ("miniupnpc" ,miniupnpc)
221 ("pulseaudio" ,pulseaudio)
226 ("soundtouch" ,soundtouch)
227 ("vulkan-loader" ,vulkan-loader)
229 (home-page "https://dolphin-emu.org/")
230 (synopsis "Nintendo Wii and GameCube emulator")
232 "Dolphin is an emulator for two Nintendo video game consoles: the
233 GameCube and the Wii. It provides compatibility with all PC controllers,
234 turbo speed, networked multiplayer, and graphical enhancements.")
235 (supported-systems '("x86_64-linux" "aarch64-linux"))
236 ; dolphin/Data/Sys/GC/font_*.bin: Licensed under ASL2.0.
237 (license (list license:gpl2+ license:asl2.0 license:fdl1.2+)))))
239 (define-public dosbox
245 (uri (string-append "https://sourceforge.net/projects/dosbox"
246 "/files/dosbox/" version "/dosbox-"
247 version ".tar.gz/download"))
248 (file-name (string-append name "-" version ".tar.gz"))
251 "02i648i50dwicv1vaql15rccv4g8h5blf5g6inv67lrfxpbkvlf0"))))
252 (build-system gnu-build-system)
254 `(("autoconf" ,autoconf)
255 ("automake" ,automake)))
260 ("alsa-lib" ,alsa-lib)
263 (home-page "http://www.dosbox.com")
264 (synopsis "X86 emulator with CGA/EGA/VGA/etc. graphics and sound")
265 (description "DOSBox is a DOS-emulator that uses the SDL library. DOSBox
266 also emulates CPU:286/386 realmode/protected mode, Directory
267 FileSystem/XMS/EMS, Tandy/Hercules/CGA/EGA/VGA/VESA graphics, a
268 SoundBlaster/Gravis Ultra Sound card for excellent sound compatibility with
270 (license license:gpl2+)))
272 (define-public emulation-station
273 (let ((commit "646bede3d9ec0acf0ae378415edac136774a66c5"))
275 (name "emulation-station")
278 (method git-fetch) ; no tarball available
280 (url "https://github.com/Aloshi/EmulationStation.git")
281 (commit commit))) ; no version tag
282 (file-name (string-append name "-" version "-checkout"))
285 "0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v"))))
286 (build-system cmake-build-system)
288 '(#:tests? #f)) ; no tests
290 `(("alsa-lib" ,alsa-lib)
294 ("freeimage" ,freeimage)
295 ("freetype" ,freetype)
298 (synopsis "Video game console emulator front-end")
299 (description "EmulationStation provides a graphical front-end to a large
300 number of video game console emulators. It features an interface that is
301 usable with any game controller that has at least 4 buttons, theming support,
302 and a game metadata scraper.")
303 (home-page "http://www.emulationstation.org")
304 (license license:expat))))
314 "https://gitlab.com/higan/higan/repository/archive.tar.gz?ref=v"
316 (file-name (string-append name "-" version ".tar.gz"))
318 (base32 "0y42pra0dxzlbkyzcp3r8a39pji2bj3p9fl40425f60af2igr4rw"))
319 (patches (search-patches "higan-remove-march-native-flag.patch"))))
320 (build-system gnu-build-system)
322 `(("pkg-config" ,pkg-config)))
324 `(("alsa-lib" ,alsa-lib)
328 ("gtksourceview-2" ,gtksourceview-2)
332 ("pulseaudio" ,pulseaudio)
336 (let ((build-phase (assoc-ref %standard-phases 'build))
337 (install-phase (assoc-ref %standard-phases 'install)))
338 (modify-phases %standard-phases
339 ;; The higan build system has no configure phase.
341 (add-before 'build 'chdir-to-higan
344 (add-before 'install 'create-/share/applications
345 (lambda* (#:key outputs #:allow-other-keys)
346 (let ((out (assoc-ref outputs "out")))
347 ;; It seems the author forgot to do this in the Makefile.
348 (mkdir-p (string-append out "/share/applications")))))
349 (add-after 'install 'chdir-to-icarus
351 (chdir "../icarus")))
352 (add-after 'chdir-to-icarus 'build-icarus build-phase)
353 (add-after 'build-icarus 'install-icarus install-phase)
354 (add-after 'install-icarus 'wrap-higan-executable
355 (lambda* (#:key inputs outputs #:allow-other-keys)
356 (let* ((out (assoc-ref outputs "out"))
357 (bin (string-append out "/bin"))
358 (higan (string-append bin "/higan"))
359 (higan-original (string-append higan "-original"))
360 (bash (string-append (assoc-ref inputs "bash")
362 (coreutils (assoc-ref inputs "coreutils"))
363 (mkdir (string-append coreutils "/bin/mkdir"))
364 (cp (string-append coreutils "/bin/cp"))
365 (cp-r (string-append cp " -r --no-preserve=mode")))
366 ;; First, have the executable make sure ~/.local/share/higan
367 ;; contains up to date files. Higan insists on looking there
368 ;; for these data files.
369 (rename-file higan higan-original)
370 (with-output-to-file higan
375 ;; higan doesn't respect $XDG_DATA_HOME
376 mkdir " -p ~/.local/share\n"
377 cp-r " " out "/share/higan ~/.local/share\n"
378 "exec " higan-original))))
380 ;; Second, make sure higan will find icarus in PATH.
382 `("PATH" ":" prefix (,bin))))))))
385 (string-append "prefix=" (assoc-ref %outputs "out")))
386 ;; There is no test suite.
388 (home-page "http://byuu.org/emulation/higan/")
389 (synopsis "Nintendo multi-system emulator")
391 "higan (formerly bsnes) is an emulator for multiple Nintendo video game
392 consoles, including the Nintendo Entertainment System (NES/Famicom), Super
393 Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy
394 Color (GBC), and Game Boy Advance (GBA). It also supports the subsystems
395 Super Game Boy, BS-X Satellaview, and Sufami Turbo.")
396 ;; As noted in these files among more:
397 ;; - icarus/icarus.cpp
398 ;; - higan/emulator/emulator.hpp
399 (license license:gpl3)))
408 (url "https://github.com/mgba-emu/mgba.git")
410 (file-name (git-file-name name version))
413 "0g0xa1mzvan0sl1p5c784j2g5mcw9kd2b7wiahy06gy0c1nmbcnp"))
414 (modules '((guix build utils)))
416 ;; Make sure we don't use the bundled software.
420 (let ((lib-subdir (string-append "src/third-party/" subdir)))
421 (delete-file-recursively lib-subdir)))
422 '("libpng" "lzma" "sqlite3" "zlib"))
424 (build-system cmake-build-system)
426 `(#:tests? #f ;no "test" target
428 (list "-DUSE_LZMA=OFF" ;do not use bundled LZMA
429 "-DUSE_LIBZIP=OFF"))) ;use "zlib" instead
430 (native-inputs `(("pkg-config" ,pkg-config)))
431 (inputs `(("ffmpeg" ,ffmpeg)
432 ("imagemagick" ,imagemagick)
435 ("libepoxy" ,libepoxy)
441 ("qtmultimedia" ,qtmultimedia)
446 (home-page "https://mgba.io")
447 (synopsis "Game Boy Advance emulator")
449 "mGBA is an emulator for running Game Boy Advance games. It aims to be
450 faster and more accurate than many existing Game Boy Advance emulators, as
451 well as adding features that other emulators lack. It also supports Game Boy
452 and Game Boy Color games.")
453 ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+ and "inih.c" is
455 (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3))))
457 (define-public mupen64plus-core
459 (name "mupen64plus-core")
465 (url "https://github.com/mupen64plus/mupen64plus-core.git")
467 (file-name (git-file-name name version))
469 (base32 "116fndl6652zrp1r6ag4xv3dzp1x52mlvadj8xwflq07fd5rhri1"))))
470 (build-system gnu-build-system)
472 `(("pkg-config" ,pkg-config)
475 `(("freetype" ,freetype)
483 (modify-phases %standard-phases
484 ;; The mupen64plus build system has no configure phase.
486 ;; Makefile is in a subdirectory.
488 'build 'cd-to-project-dir
490 (chdir "projects/unix"))))
491 #:make-flags (let ((out (assoc-ref %outputs "out")))
492 (list "all" (string-append "PREFIX=" out)))
493 ;; There are no tests.
495 ;; As per the Makefile (in projects/unix/Makefile):
496 (supported-systems '("i686-linux" "x86_64-linux"))
497 (home-page "http://www.mupen64plus.org/")
498 (synopsis "Nintendo 64 emulator core library")
500 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
501 which is capable of accurately playing many games. This package contains the
503 (license license:gpl2+)))
505 (define-public mupen64plus-audio-sdl
507 (name "mupen64plus-audio-sdl")
513 (url "https://github.com/mupen64plus/mupen64plus-audio-sdl.git")
515 (file-name (git-file-name name version))
517 (base32 "0z19amfg9vr2pqjjri1ipc7hs681fzjcnb0f9y7bjhp5n8d7p6bb"))))
518 (build-system gnu-build-system)
520 `(("pkg-config" ,pkg-config)
523 `(("mupen64plus-core" ,mupen64plus-core)
527 (modify-phases %standard-phases
528 ;; The mupen64plus build system has no configure phase.
530 ;; Makefile is in a subdirectory.
532 'build 'cd-to-project-dir
534 (chdir "projects/unix"))))
536 (let ((out (assoc-ref %outputs "out"))
537 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
539 (string-append "PREFIX=" out)
540 (string-append "APIDIR=" m64p "/include/mupen64plus")))
541 ;; There are no tests.
543 (home-page "http://www.mupen64plus.org/")
544 (synopsis "Mupen64Plus SDL input plugin")
546 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
547 which is capable of accurately playing many games. This package contains the
549 (license license:gpl2+)))
551 (define-public mupen64plus-input-sdl
553 (name "mupen64plus-input-sdl")
559 (url "https://github.com/mupen64plus/mupen64plus-input-sdl.git")
561 (file-name (git-file-name name version))
563 (base32 "1dyazfbdjycdfslq8jixqiqhziw0rlkvach2r9dz91229jmkyc9c"))))
564 (build-system gnu-build-system)
568 `(("mupen64plus-core" ,mupen64plus-core)
572 (modify-phases %standard-phases
573 ;; The mupen64plus build system has no configure phase.
575 ;; Makefile is in a subdirectory.
577 'build 'cd-to-project-dir
579 (chdir "projects/unix"))))
581 (let ((out (assoc-ref %outputs "out"))
582 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
584 (string-append "PREFIX=" out)
585 (string-append "APIDIR=" m64p "/include/mupen64plus")))
586 ;; There are no tests.
588 (home-page "http://www.mupen64plus.org/")
589 (synopsis "Mupen64Plus SDL input plugin")
591 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
592 which is capable of accurately playing many games. This package contains the
594 (license license:gpl2+)))
596 (define-public mupen64plus-rsp-hle
598 (name "mupen64plus-rsp-hle")
604 (url "https://github.com/mupen64plus/mupen64plus-rsp-hle.git")
606 (file-name (git-file-name name version))
608 (base32 "0pi31qzjjp7aypdvvnz6ms18g09c4gqzxi6328zj8sji94b75gf0"))))
609 (build-system gnu-build-system)
611 `(("mupen64plus-core" ,mupen64plus-core)))
614 (modify-phases %standard-phases
615 ;; The mupen64plus build system has no configure phase.
617 ;; Makefile is in a subdirectory.
619 'build 'cd-to-project-dir
621 (chdir "projects/unix"))))
623 (let ((out (assoc-ref %outputs "out"))
624 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
626 (string-append "PREFIX=" out)
627 (string-append "APIDIR=" m64p "/include/mupen64plus")))
628 ;; There are no tests.
630 (home-page "http://www.mupen64plus.org/")
631 (synopsis "Mupen64Plus SDL input plugin")
633 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
634 which is capable of accurately playing many games. This package contains the
635 high-level emulation (HLE) RSP processor plugin.")
636 (license license:gpl2+)))
638 (define-public mupen64plus-rsp-z64
640 (name "mupen64plus-rsp-z64")
646 (url "https://github.com/mupen64plus/mupen64plus-rsp-z64.git")
648 (file-name (git-file-name name version))
650 (base32 "0nfyjns9k8xbg3aqs7593nfaxvlj72h3l8h467442xlk8ajfcylx"))))
651 (build-system gnu-build-system)
653 `(("mupen64plus-core" ,mupen64plus-core)))
656 (modify-phases %standard-phases
657 ;; The mupen64plus build system has no configure phase.
659 ;; Makefile is in a subdirectory.
661 'build 'cd-to-project-dir
663 (chdir "projects/unix"))))
665 (let ((out (assoc-ref %outputs "out"))
666 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
668 (string-append "PREFIX=" out)
669 (string-append "APIDIR=" m64p "/include/mupen64plus")))
670 ;; There are no tests.
672 (home-page "http://www.mupen64plus.org/")
673 (synopsis "Mupen64Plus SDL input plugin")
675 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
676 which is capable of accurately playing many games. This package contains the
677 Z64 RSP processor plugin.")
678 (license license:gpl2+)))
680 (define-public mupen64plus-video-arachnoid
682 (name "mupen64plus-video-arachnoid")
688 (url "https://github.com/mupen64plus/mupen64plus-video-arachnoid.git")
690 (file-name (git-file-name name version))
692 (base32 "1v9fqwpb6pawr8z5cm2ki7bqkks4iyr5c4jy4v5khj6h8zcv55gc"))))
693 (build-system gnu-build-system)
695 `(("pkg-config" ,pkg-config)
699 ("mupen64plus-core" ,mupen64plus-core)))
702 (modify-phases %standard-phases
703 ;; The mupen64plus build system has no configure phase.
705 ;; Makefile is in a subdirectory.
707 'build 'cd-to-project-dir
709 (chdir "projects/unix"))))
711 (let ((out (assoc-ref %outputs "out"))
712 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
714 (string-append "PREFIX=" out)
715 (string-append "APIDIR=" m64p "/include/mupen64plus")))
716 ;; There are no tests.
718 (home-page "http://www.mupen64plus.org/")
719 (synopsis "Mupen64Plus Rice Video plugin")
721 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
722 which is capable of accurately playing many games. This package contains the
723 Arachnoid video plugin.")
724 (license license:gpl2+)))
726 (define-public mupen64plus-video-glide64
728 (name "mupen64plus-video-glide64")
734 (url "https://github.com/mupen64plus/mupen64plus-video-glide64.git")
736 (file-name (git-file-name name version))
738 (base32 "0qn5za7g7796kh2ag3xpmhbqg0yf71g9liz6ks0rha8pz73lgs01"))))
739 (build-system gnu-build-system)
741 `(("pkg-config" ,pkg-config)
745 ("mupen64plus-core" ,mupen64plus-core)
749 (modify-phases %standard-phases
750 ;; The mupen64plus build system has no configure phase.
752 ;; Makefile is in a subdirectory.
754 'build 'cd-to-project-dir
756 (chdir "projects/unix")))
757 ;; XXX Should be unnecessary with the next release.
761 (substitute* "Makefile"
762 (("SDL_CONFIG = (.*)sdl-config" all prefix)
763 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
765 (let ((out (assoc-ref %outputs "out"))
766 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
768 (string-append "PREFIX=" out)
769 (string-append "APIDIR=" m64p "/include/mupen64plus")))
770 ;; There are no tests.
772 (home-page "http://www.mupen64plus.org/")
773 (synopsis "Mupen64Plus Rice Video plugin")
775 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
776 which is capable of accurately playing many games. This package contains the
777 Glide64 video plugin.")
778 (license license:gpl2+)))
780 (define-public mupen64plus-video-glide64mk2
782 (name "mupen64plus-video-glide64mk2")
788 (url "https://github.com/mupen64plus/mupen64plus-video-glide64mk2.git")
790 (file-name (git-file-name name version))
792 (base32 "08pm28a36dpr0cvr8pzw0n5ksdazp7jqvlmqfy2lwb4dm0cwhkqd"))))
793 (build-system gnu-build-system)
795 `(("pkg-config" ,pkg-config)
801 ("mupen64plus-core" ,mupen64plus-core)
806 (modify-phases %standard-phases
807 ;; The mupen64plus build system has no configure phase.
809 ;; Makefile is in a subdirectory.
811 'build 'cd-to-project-dir
813 (chdir "projects/unix"))))
815 (let ((out (assoc-ref %outputs "out"))
816 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
818 (string-append "PREFIX=" out)
819 (string-append "APIDIR=" m64p "/include/mupen64plus")))
820 ;; There are no tests.
822 (home-page "http://www.mupen64plus.org/")
823 (synopsis "Mupen64Plus Rice Video plugin")
825 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
826 which is capable of accurately playing many games. This package contains the
827 Glide64MK2 video plugin.")
828 (license license:gpl2+)))
830 (define-public mupen64plus-video-rice
832 (name "mupen64plus-video-rice")
838 (url "https://github.com/mupen64plus/mupen64plus-video-rice.git")
840 (file-name (git-file-name name version))
842 (base32 "0rpmbcq67gsj5h5jjis146378qc1mskskvx20y1ikx59yhbamh13"))))
843 (build-system gnu-build-system)
845 `(("pkg-config" ,pkg-config)
850 ("mupen64plus-core" ,mupen64plus-core)
854 (modify-phases %standard-phases
855 ;; The mupen64plus build system has no configure phase.
857 ;; Makefile is in a subdirectory.
859 'build 'cd-to-project-dir
861 (chdir "projects/unix"))))
863 (let ((out (assoc-ref %outputs "out"))
864 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
866 (string-append "PREFIX=" out)
867 (string-append "APIDIR=" m64p "/include/mupen64plus")))
868 ;; There are no tests.
870 (home-page "http://www.mupen64plus.org/")
871 (synopsis "Mupen64Plus Rice Video plugin")
873 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
874 which is capable of accurately playing many games. This package contains the
876 (license license:gpl2+)))
878 (define-public mupen64plus-video-z64
880 (name "mupen64plus-video-z64")
886 (url "https://github.com/mupen64plus/mupen64plus-video-z64.git")
888 (file-name (git-file-name name version))
890 (base32 "04qa2fdd6dakpk2v0d4l80xh9b4h8gm71g80c0wyyxdhmhwk1r9c"))
891 (patches (search-patches "mupen64plus-video-z64-glew-correct-path.patch"))))
892 (build-system gnu-build-system)
894 `(("pkg-config" ,pkg-config)
898 ("mupen64plus-core" ,mupen64plus-core)
902 (modify-phases %standard-phases
903 ;; The mupen64plus build system has no configure phase.
905 ;; Makefile is in a subdirectory.
907 'build 'cd-to-project-dir
909 (chdir "projects/unix")))
910 ;; XXX Should be unnecessary with the next release.
914 (substitute* "Makefile"
915 (("SDL_CONFIG = (.*)sdl-config" all prefix)
916 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
918 (let ((out (assoc-ref %outputs "out"))
919 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
921 (string-append "PREFIX=" out)
922 (string-append "APIDIR=" m64p "/include/mupen64plus")))
923 ;; There are no tests.
925 (home-page "http://www.mupen64plus.org/")
926 (synopsis "Mupen64Plus Z64 video plugin")
928 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
929 which is capable of accurately playing many games. This package contains the
931 (license license:gpl2+)))
933 (define-public mupen64plus-ui-console
935 (name "mupen64plus-ui-console")
941 (url "https://github.com/mupen64plus/mupen64plus-ui-console.git")
943 (file-name (git-file-name name version))
945 (base32 "0vrf98qa6a0y3647kslsv644fag233dxh5dcr1yncjiiwickcr5a"))
946 (patches (search-patches "mupen64plus-ui-console-notice.patch"))))
947 (build-system gnu-build-system)
949 `(("pkg-config" ,pkg-config)
953 ;; Mupen64Plus supports a single data directory and a single plugin
954 ;; directory in its configuration, yet we need data and plugin files from
955 ;; a variety of packages. The best way to deal with this is to install
956 ;; all packages from which data and plugin files are needed into one's
957 ;; profile, and point the configuration there. Hence, propagate the most
958 ;; important packages here to save the user from the bother. The patch
959 ;; mupen64plus-ui-console-notice also gives users instructions on what
960 ;; they need to do in order to point the configuration to their profile.
962 `(("mupen64plus-core" ,mupen64plus-core)
963 ("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl)
964 ("mupen64plus-input-sdl" ,mupen64plus-input-sdl)
965 ("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle)
966 ("mupen64plus-video-glide64" ,mupen64plus-video-glide64)
967 ("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2)
968 ("mupen64plus-video-rice" ,mupen64plus-video-rice)))
971 (modify-phases %standard-phases
972 ;; The mupen64plus build system has no configure phase.
974 ;; Makefile is in a subdirectory.
976 'build 'cd-to-project-dir
978 (chdir "projects/unix"))))
980 (let ((out (assoc-ref %outputs "out"))
981 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
983 (string-append "PREFIX=" out)
984 (string-append "APIDIR=" m64p "/include/mupen64plus")
985 ;; Trailing slash matters here.
986 (string-append "COREDIR=" m64p "/lib/")))
987 ;; There are no tests.
989 (home-page "http://www.mupen64plus.org/")
990 (synopsis "Mupen64Plus SDL input plugin")
992 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
993 which is capable of accurately playing many games. This package contains the
994 command line user interface. Installing this package is the easiest way
995 towards a working Mupen64Plus for casual users.")
996 (license license:gpl2+)))
998 (define-public nestopia-ue
1000 (name "nestopia-ue")
1006 (url "https://github.com/rdanbrook/nestopia.git")
1008 (file-name (git-file-name name version))
1010 (base32 "19c8vx5yxbysl0sszk5blfngwacshdgwbf44g1qaxvq8ywiyxmb4"))
1011 (modules '((guix build utils)))
1014 ;; We don't need libretro for the GNU/Linux build.
1015 (delete-file-recursively "libretro")
1017 (build-system cmake-build-system)
1019 `(("pkg-config" ,pkg-config)))
1023 ("libarchive" ,libarchive)
1024 ("libepoxy" ,libepoxy)
1029 (modify-phases %standard-phases
1030 ;; This fixes the file chooser crash that happens with GTK 3.
1031 (add-after 'install 'wrap-program
1032 (lambda* (#:key inputs outputs #:allow-other-keys)
1033 (let* ((out (assoc-ref outputs "out"))
1034 (nestopia (string-append out "/bin/nestopia"))
1035 (gtk (assoc-ref inputs "gtk+"))
1036 (gtk-share (string-append gtk "/share")))
1037 (wrap-program nestopia
1038 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))))))
1039 ;; There are no tests.
1041 (home-page "http://0ldsk00l.ca/nestopia/")
1042 (synopsis "Nintendo Entertainment System (NES/Famicom) emulator")
1044 "Nestopia UE (Undead Edition) is a fork of the Nintendo Entertainment
1045 System (NES/Famicom) emulator Nestopia, with enhancements from members of the
1046 emulation community. It provides highly accurate emulation.")
1047 (license license:gpl2+)))
1049 (define-public retroarch
1057 (url "https://github.com/libretro/RetroArch.git")
1058 (commit (string-append "v" version))))
1059 (file-name (git-file-name name version))
1061 (base32 "026720z0vpiwr4da7l2x2yinns09fmg6yxsib203xwnixj399azi"))))
1062 (build-system gnu-build-system)
1064 `(#:tests? #f ; no tests
1066 (modify-phases %standard-phases
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-loader"))
1072 (wayland-protocols (assoc-ref inputs "wayland-protocols")))
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* "gfx/common/wayland/generate_wayland_protos.sh"
1077 (("/usr/local/share/wayland-protocols")
1078 (string-append wayland-protocols "/share/wayland-protocols")))
1079 (substitute* "qb/qb.libs.sh"
1080 (("/bin/true") (which "true")))
1082 (substitute* '("libretro-common/file/archive_file_zlib.c"
1083 "libretro-common/streams/trans_stream_zlib.c"
1084 "network/httpserver/httpserver.c")
1085 (("<compat/zlib.h>") "<zlib.h>"))
1086 ;; The configure script does not yet accept the extra arguments
1087 ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase.
1090 ,@(if (string-prefix? "armhf" (or (%current-target-system)
1092 '("--enable-neon" "--enable-floathard")
1094 (string-append "--prefix=" out)
1095 (string-append "--global-config-dir=" etc))))))))
1097 `(("alsa-lib" ,alsa-lib)
1099 ("freetype" ,freetype)
1100 ("libxinerama" ,libxinerama)
1101 ("libxkbcommon" ,libxkbcommon)
1102 ("libxml2" ,libxml2)
1103 ("libxrandr" ,libxrandr)
1107 ("pulseaudio" ,pulseaudio)
1112 ("vulkan-loader" ,vulkan-loader)
1113 ("wayland" ,wayland)
1116 `(("pkg-config" ,pkg-config)
1117 ("wayland-protocols" ,wayland-protocols)
1119 (home-page "https://www.libretro.com/")
1120 (synopsis "Reference frontend for the libretro API")
1122 "Libretro is a simple but powerful development interface that allows for
1123 the easy creation of emulators, games and multimedia applications that can plug
1124 straight into any libretro-compatible frontend. RetroArch is the official
1125 reference frontend for the libretro API, currently used by most as a modular
1126 multi-system game/emulator system.")
1127 (license license:gpl3+)))
1129 (define-public scummvm
1136 (uri (string-append "http://www.scummvm.org/frs/scummvm/" version
1137 "/scummvm-" version ".tar.xz"))
1140 "0q6aiw97wsrf8cjw9vjilzhqqsr2rw2lll99s8i5i9svan6l314p"))))
1141 (build-system gnu-build-system)
1143 `(#:tests? #f ;require "git"
1144 #:configure-flags (list "--enable-release") ;for optimizations
1146 (modify-phases %standard-phases
1148 ;; configure does not work followed by both "SHELL=..." and
1149 ;; "CONFIG_SHELL=..."; set environment variables instead
1150 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1151 (let* ((out (assoc-ref outputs "out"))
1152 (bash (which "bash"))
1153 (flags `(,(string-append "--prefix=" out)
1154 ,@configure-flags)))
1155 (setenv "SHELL" bash)
1156 (setenv "CONFIG_SHELL" bash)
1157 (apply invoke "./configure" flags)))))))
1159 `(("pkg-config" ,pkg-config)))
1161 `(("alsa-lib" ,alsa-lib)
1163 ("fluidsynth" ,fluidsynth)
1164 ("freetype" ,freetype)
1166 ("libjpeg-turbo" ,libjpeg-turbo)
1168 ("libmpeg2" ,libmpeg2)
1171 ("libtheora" ,libtheora)
1172 ("libvorbis" ,libvorbis)
1176 (home-page "https://www.scummvm.org/")
1177 (synopsis "Engine for several graphical adventure games")
1178 (description "ScummVM is a program which allows you to run certain
1179 classic graphical point-and-click adventure games, provided you
1180 already have their data files. The clever part about this: ScummVM
1181 just replaces the executables shipped with the games, allowing you to
1182 play them on systems for which they were never designed!")
1183 (license license:gpl2+)))
1193 (url "https://github.com/mamedev/mame.git")
1194 (commit (apply string-append "mame" (string-split version #\.)))))
1195 (file-name (git-file-name name version))
1198 "0p3zcb9l624dsy2gyv23ppp1k1iwd1vrg8cbn5v4fx1s44mx7f5c"))
1200 ;; FIXME: Remove once 0.213 is out. Applied upstream as
1201 ;; 0b5b13cf1e28550b49c387dec93f9801f029e313.
1202 (search-patches "mame-rapidjson-fix.patch"))
1203 (modules '((guix build utils)))
1205 ;; Remove bundled libraries.
1207 (with-directory-excursion "3rdparty"
1208 (for-each delete-file-recursively
1209 '("asio" "expat" "glm" "libflac" "libjpeg" "lua"
1210 "portaudio" "portmidi" "pugixml" "rapidjson" "SDL2"
1211 "SDL2-override" "sqlite3" "utf8proc" "zlib")))
1213 (build-system gnu-build-system)
1217 (string-append "QT_HOME=" (assoc-ref %build-inputs "qtbase"))
1218 (string-append "SDL_INI_PATH="
1219 (assoc-ref %outputs "out")
1222 (string-append "USE_SYSTEM_LIB_" (string-upcase lib) "=1"))
1223 '("asio" "expat" "flac" "glm" "jpeg" "lua" "portaudio" "portmidi"
1224 "pugixml" "rapidjson" "sqlite3" "utf8proc" "zlib")))
1225 #:tests? #f ;no test in regular release
1227 (modify-phases %standard-phases
1229 (add-after 'build 'build-documentation
1230 (lambda _ (invoke "make" "-C" "docs" "man" "info")))
1232 ;; Upstream does not provide an installation phase.
1233 (lambda* (#:key outputs #:allow-other-keys)
1234 (let* ((out (assoc-ref outputs "out"))
1235 (share (string-append out "/share/mame")))
1237 (for-each (lambda (dir)
1238 (copy-recursively dir (string-append share "/" dir)))
1239 '("artwork" "bgfx" "ctrlr" "hash" "ini" "language"
1240 "plugins" "samples"))
1241 (let ((keymaps (string-append share "/keymaps")))
1242 (for-each (lambda (file) (install-file file keymaps))
1243 (find-files "keymaps" ".*LINUX\\.map")))
1244 (let ((fonts (string-append share "/fonts")))
1245 (install-file "uismall.bdf" fonts))
1246 (when (file-exists? "mame64")
1247 (rename-file "mame64" "mame"))
1248 (install-file "mame" (string-append out "/bin")))
1250 (add-after 'install 'install-documentation
1251 (lambda* (#:key outputs #:allow-other-keys)
1252 (let* ((out (assoc-ref outputs "out"))
1253 (man (string-append out "/share/man/man1"))
1254 (info (string-append out "/share/info")))
1255 (install-file "docs/build/man/MAME.1" man)
1256 (install-file "docs/build/texinfo/MAME.info" info))
1258 (add-after 'install 'install-ini-file
1259 ;; Generate an ini file so as to set some directories (e.g., roms)
1260 ;; to a writable location, i.e., "$HOME/.mame/" and "$HOME/mame/".
1262 ;; XXX: We need to insert absolute references to the store. It can
1263 ;; be an issue if they leak into user's home directory, e.g., with
1264 ;; "mame -createconfig" and the package is later GC'ed.
1265 (lambda* (#:key outputs #:allow-other-keys)
1266 (let* ((out (assoc-ref outputs "out"))
1267 (share (string-append out "/share/mame"))
1268 (ini (string-append share "/ini")))
1269 (with-output-to-file (string-append ini "/mame.ini")
1272 "inipath $HOME/.mame;~a/ini~@
1273 homepath $HOME/mame~@
1274 rompath $HOME/mame/roms~@
1275 samplepath $HOME/mame/samples;~a/samples~@
1276 cheatpath $HOME/mame/cheat~@
1277 artpath $HOME/mame/artwork;~a/artwork~@
1278 crosshairpath $HOME/mame/crosshair~@
1279 snapshot_directory $HOME/mame/snapshots~@
1281 fontpath $HOME/mame/fonts;~a/fonts~@
1282 ctrlrpath $HOME/mame/ctrlr;~a/ctrlr~@
1284 pluginspath $HOME/mame/plugins;~a/plugins~@
1285 languagepath ~a/language~@
1286 cfg_directory $HOME/.mame/cfg~@
1287 nvram_directory $HOME/.mame/nvram~@
1288 input_directory $HOME/.mame/inp~@
1289 state_directory $HOME/.mame/sta~@
1290 diff_directory $HOME/.mame/diff~@
1291 comment_directory $HOME/.mame/comments~%"
1292 share share share share share share share share
1294 (with-output-to-file (string-append ini "/ui.ini")
1297 "historypath $HOME/mame/history~@
1298 categorypath $HOME/mame/folders~@
1299 cabinets_directory $HOME/mame/cabinets~@
1300 cpanels_directory $HOME/mame/cpanel~@
1301 pcbs_directory $HOME/mame/pcb~@
1302 flyers_directory $HOME/mame/flyers~@
1303 titles_directory $HOME/mame/titles~@
1304 ends_directory $HOME/mame/ends~@
1305 marquees_directory $HOME/mame/marquees~@
1306 artwork_preview_directory $HOME/mame/artpreview~@
1307 bosses_directory $HOME/mame/bosses~@
1308 logos_directory $HOME/mame/logo~@
1309 scores_directory $HOME/mame/scores~@
1310 versus_directory $HOME/mame/versus~@
1311 gameover_directory $HOME/mame/gameover~@
1312 howto_directory $HOME/mame/howto~@
1313 select_directory $HOME/mame/select~@
1314 icons_directory $HOME/mame/icons~@
1315 covers_directory $HOME/mame/covers~@
1316 ui_path $HOME/.mame/ui~%")))
1318 (add-after 'install 'install-desktop-file
1319 (lambda* (#:key outputs #:allow-other-keys)
1320 (let* ((out (assoc-ref outputs "out"))
1321 (desktop (string-append out "/share/applications"))
1322 (executable (string-append out "/bin/mame")))
1324 (with-output-to-file (string-append desktop "/mame.desktop")
1329 Comment=Multi-purpose emulation framework~@
1334 Categories=Game;Emulator;~@
1335 Keywords=Game;Emulator;Arcade;~%"
1339 `(("pkg-config" ,pkg-config)
1340 ("sphinx" ,python-sphinx)
1341 ("sphinxcontrib-svg2pdfconverter" ,python-sphinxcontrib-svg2pdfconverter)
1342 ("texinfo" ,texinfo)))
1344 `(("alsa-lib" ,alsa-lib)
1348 ("fontconfig" ,fontconfig)
1350 ("libjpeg" ,libjpeg-8) ;jpeg_read_header argument error in libjpeg-9
1352 ("libxinerama" ,libxinerama)
1354 ("portaudio" ,portaudio)
1355 ("portmidi" ,portmidi)
1356 ("pugixml" ,pugixml)
1357 ("python-wrapper" ,python-wrapper)
1359 ("rapidjson" ,rapidjson)
1360 ("sdl" ,(sdl-union (list sdl2 sdl2-ttf)))
1362 ("utf8proc" ,utf8proc)
1364 (home-page "http://mamedev.org/")
1365 (synopsis "Multi-purpose emulation framework")
1366 (description "MAME's purpose is to preserve decades of software
1367 history. As electronic technology continues to rush forward, MAME
1368 prevents this important @emph{vintage} software from being lost and
1369 forgotten. This is achieved by documenting the hardware and how it
1370 functions. The source code to MAME serves as this documentation.")
1371 ;; The MAME project as a whole is distributed under the terms of GPL2+.
1372 ;; However, over 90% of the files are under Expat license. Also, artwork,
1373 ;; keymaps, languages and samples are under CC0.
1374 (license (list license:gpl2+ license:expat license:cc0))))