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, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
10 ;;; Copyright © 2017, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
12 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
13 ;;; Copyright © 2019 David Wilson <david@daviwil.com>
14 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
16 ;;; This file is part of GNU Guix.
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31 (define-module (gnu packages emulators)
32 #:use-module (ice-9 match)
33 #:use-module ((guix licenses) #:prefix license:)
34 #:use-module (guix packages)
35 #:use-module (guix download)
36 #:use-module (guix git-download)
37 #:use-module (guix svn-download)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages algebra)
40 #:use-module (gnu packages assembly)
41 #:use-module (gnu packages audio)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages boost)
45 #:use-module (gnu packages backup)
46 #:use-module (gnu packages cdrom)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages curl)
49 #:use-module (gnu packages elf)
50 #:use-module (gnu packages fonts)
51 #:use-module (gnu packages fontutils)
52 #:use-module (gnu packages freedesktop)
53 #:use-module (gnu packages game-development)
54 #:use-module (gnu packages gcc)
55 #:use-module (gnu packages gettext)
56 #:use-module (gnu packages gl)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages imagemagick)
61 #:use-module (gnu packages libedit)
62 #:use-module (gnu packages libusb)
63 #:use-module (gnu packages linux)
64 #:use-module (gnu packages lua)
65 #:use-module (gnu packages maths)
66 #:use-module (gnu packages mp3)
67 #:use-module (gnu packages music)
68 #:use-module (gnu packages ncurses)
69 #:use-module (gnu packages networking)
70 #:use-module (gnu packages pkg-config)
71 #:use-module (gnu packages pulseaudio)
72 #:use-module (gnu packages python)
73 #:use-module (gnu packages qt)
74 #:use-module (gnu packages sdl)
75 #:use-module (gnu packages sphinx)
76 #:use-module (gnu packages sqlite)
77 #:use-module (gnu packages texinfo)
78 #:use-module (gnu packages textutils)
79 #:use-module (gnu packages tls)
80 #:use-module (gnu packages upnp)
81 #:use-module (gnu packages video)
82 #:use-module (gnu packages vulkan)
83 #:use-module (gnu packages wxwidgets)
84 #:use-module (gnu packages xdisorg)
85 #:use-module (gnu packages xiph)
86 #:use-module (gnu packages xml)
87 #:use-module (gnu packages xorg)
88 #:use-module (gnu packages web)
89 #:use-module (guix build-system cmake)
90 #:use-module (guix build-system glib-or-gtk)
91 #:use-module (guix build-system gnu))
93 (define-public desmume
101 "mirror://sourceforge/desmume/desmume/"
102 version "/desmume-" version ".tar.gz"))
105 "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs"))
106 (patches (search-patches "desmume-gcc6-fixes.patch"
107 "desmume-gcc7-fixes.patch"))))
108 (build-system gnu-build-system)
110 ;; Enable support for WiFi and microphone.
111 `(#:configure-flags '("--enable-wifi"
114 `(("pkg-config" ,pkg-config)
115 ("intltool" ,intltool)))
122 (home-page "http://desmume.org/")
123 (synopsis "Nintendo DS emulator")
125 "DeSmuME is an emulator for the Nintendo DS handheld gaming console.")
126 (license license:gpl2)))
128 ;; Building from recent Git because the official 5.0 release no longer builds.
129 (define-public dolphin-emu
130 (let ((commit "a9745400ec5cea7e55d94955afbdc44d1a4982d1")
134 (version (git-version "5.0" revision commit))
139 (url "https://github.com/dolphin-emu/dolphin.git")
141 (file-name (git-file-name name version))
142 (modules '((guix build utils)))
145 ;; Remove external stuff we don't need.
146 (for-each (lambda (dir)
147 (delete-file-recursively
148 (string-append "Externals/" dir)))
149 '("LZO" "OpenAL" "Qt" "SFML" "curl" "ffmpeg"
150 "gettext" "hidapi" "libpng" "libusb" "mbedtls"
151 "miniupnpc" "MoltenVK" "zlib"))
153 (for-each delete-file (find-files "." ".*\\.(bin|dsy|exe|jar|rar)$"))
157 "0ic08ii4vlqlmk2wkfc99jiy6nji2wfq56r7slj23wgvhznnaabk"))))
158 (build-system cmake-build-system)
162 (modify-phases %standard-phases
163 (add-before 'configure 'generate-fonts&hardcore-libvulkan-path
164 (lambda* (#:key inputs outputs #:allow-other-keys)
166 (string-append (assoc-ref inputs "font-wqy-microhei")
167 "/share/fonts/truetype/wqy-microhei.ttc"))
169 (string-append (assoc-ref inputs "vulkan-loader")
170 "/lib/libvulkan.so")))
172 (invoke "bash" "-c" "g++ -O2 $(freetype-config \
173 --cflags --libs) gc-font-tool.cpp -o gc-font-tool")
174 (invoke "./gc-font-tool" "a" fontfile "font_western.bin")
175 (invoke "./gc-font-tool" "s" fontfile "font_japanese.bin")
176 (copy-file "font_japanese.bin" "../Data/Sys/GC/font_japanese.bin")
177 (copy-file "font_western.bin" "../Data/Sys/GC/font_western.bin")
179 (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp"
180 (("\"vulkan\", 1") (string-append "\"vulkan\"")))
181 (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp"
182 (("\"vulkan\"") (string-append "\"" libvulkan "\"")))
183 (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp"
184 (("Common::DynamicLibrary::GetVersionedFilename") ""))
187 ;; The FindGTK2 cmake script only checks hardcoded directories for
191 (list (string-append "-DX11_INCLUDE_DIR="
192 (assoc-ref %build-inputs "libx11")
194 (string-append "-DX11_LIBRARIES="
195 (assoc-ref %build-inputs "libx11")
199 `(("pkg-config" ,pkg-config)
200 ("gettext" ,gettext-minimal)))
202 `(("alsa-lib" ,alsa-lib)
208 ("font-wqy-microhei" ,font-wqy-microhei)
209 ("freetype" ,freetype)
215 ("libevdev" ,libevdev)
220 ("libxrandr" ,libxrandr)
222 ("mbedtls-apache" ,mbedtls-apache)
224 ("miniupnpc" ,miniupnpc)
227 ("pulseaudio" ,pulseaudio)
232 ("soundtouch" ,soundtouch)
233 ("vulkan-loader" ,vulkan-loader)
235 (home-page "https://dolphin-emu.org/")
236 (synopsis "Nintendo Wii and GameCube emulator")
238 "Dolphin is an emulator for two Nintendo video game consoles: the
239 GameCube and the Wii. It provides compatibility with all PC controllers,
240 turbo speed, networked multiplayer, and graphical enhancements.")
241 (supported-systems '("x86_64-linux" "aarch64-linux"))
242 ; dolphin/Data/Sys/GC/font_*.bin: Licensed under ASL2.0.
243 (license (list license:gpl2+ license:asl2.0 license:fdl1.2+)))))
245 (define-public dosbox
251 (uri (string-append "https://sourceforge.net/projects/dosbox"
252 "/files/dosbox/" version "/dosbox-"
253 version ".tar.gz/download"))
254 (file-name (string-append name "-" version ".tar.gz"))
257 "02i648i50dwicv1vaql15rccv4g8h5blf5g6inv67lrfxpbkvlf0"))))
258 (build-system gnu-build-system)
260 `(("autoconf" ,autoconf)
261 ("automake" ,automake)))
266 ("alsa-lib" ,alsa-lib)
269 (home-page "https://www.dosbox.com")
270 (synopsis "X86 emulator with CGA/EGA/VGA/etc. graphics and sound")
271 (description "DOSBox is a DOS-emulator that uses the SDL library. DOSBox
272 also emulates CPU:286/386 realmode/protected mode, Directory
273 FileSystem/XMS/EMS, Tandy/Hercules/CGA/EGA/VGA/VESA graphics, a
274 SoundBlaster/Gravis Ultra Sound card for excellent sound compatibility with
276 (license license:gpl2+)))
278 (define-public emulation-station
279 ;; No release for a long time, new commits fix build issues
280 (let ((commit "9cc42adff67946175d2b7e25c6ae69cc374e98a0")
283 (name "emulation-station")
284 (version (git-version "2.0.1" revision commit))
286 (method git-fetch) ; no tarball available
288 (url "https://github.com/Aloshi/EmulationStation.git")
289 (commit commit))) ; no version tag
290 (file-name (git-file-name name version))
293 "1cva0ns650v17lfn8in095zci6lc43d23f1x3mlzc41qfqa6mbd1"))))
294 (build-system cmake-build-system)
296 '(#:tests? #f)) ; no tests
298 `(("alsa-lib" ,alsa-lib)
302 ("freeimage" ,freeimage)
303 ("freetype" ,freetype)
306 (synopsis "Video game console emulator front-end")
307 (description "EmulationStation provides a graphical front-end to a large
308 number of video game console emulators. It features an interface that is
309 usable with any game controller that has at least 4 buttons, theming support,
310 and a game metadata scraper.")
311 (home-page "https://emulationstation.org")
312 (license license:expat))))
314 ;; Note: higan v107 has been released, but as explained by the dialog that
315 ;; appears after starting the new version, it's an experimental release. The
316 ;; author recommends v106 for general use.
318 ;; When updating to v107 (or probably beyond), sdl will have to be replaced
319 ;; with sdl2, and libxrandr will need to be added to inputs. The patch
320 ;; `higan-remove-march-native-flag.patch' will not be necessary, since the flag
321 ;; is now being added only for `platform=local', which is not the default.
330 (url "https://github.com/byuu/higan/")
331 (commit (string-append "v" version))))
332 (file-name (git-file-name name version))
334 (base32 "1mxivf8124vz4hl0b0xa1yqv0z9m3i12v9psmbpqkprrbq0wbgn1"))
335 (patches (search-patches "higan-remove-march-native-flag.patch"))))
336 (build-system gnu-build-system)
338 `(("pkg-config" ,pkg-config)))
340 `(("alsa-lib" ,alsa-lib)
344 ("gtksourceview-2" ,gtksourceview-2)
348 ("pulseaudio" ,pulseaudio)
352 (let ((build-phase (assoc-ref %standard-phases 'build))
353 (install-phase (assoc-ref %standard-phases 'install)))
354 (modify-phases %standard-phases
355 ;; The higan build system has no configure phase.
357 (add-before 'build 'chdir-to-higan
361 (add-before 'install 'create-/share/applications
362 (lambda* (#:key outputs #:allow-other-keys)
363 (let ((out (assoc-ref outputs "out")))
364 ;; It seems the author forgot to do this in the Makefile.
365 (mkdir-p (string-append out "/share/applications"))
367 (add-after 'install 'chdir-to-icarus
371 (add-after 'chdir-to-icarus 'build-icarus build-phase)
372 (add-after 'build-icarus 'install-icarus install-phase)
373 (add-after 'install-icarus 'wrap-higan-executable
374 (lambda* (#:key inputs outputs #:allow-other-keys)
375 (let* ((out (assoc-ref outputs "out"))
376 (bin (string-append out "/bin"))
377 (higan (string-append bin "/higan"))
378 (higan-original (string-append higan "-original"))
379 (bash (string-append (assoc-ref inputs "bash")
381 (coreutils (assoc-ref inputs "coreutils"))
382 (mkdir (string-append coreutils "/bin/mkdir"))
383 (cp (string-append coreutils "/bin/cp"))
384 (cp-r (string-append cp " -r --no-preserve=mode")))
385 ;; First, have the executable make sure ~/.local/share/higan
386 ;; contains up to date files. Higan insists on looking there
387 ;; for these data files.
388 (rename-file higan higan-original)
389 (with-output-to-file higan
394 ;; higan doesn't respect $XDG_DATA_HOME
395 mkdir " -p ~/.local/share\n"
396 cp-r " " out "/share/higan ~/.local/share\n"
397 "exec " higan-original))))
399 ;; Second, make sure higan will find icarus in PATH.
401 `("PATH" ":" prefix (,bin)))
405 (string-append "prefix=" (assoc-ref %outputs "out")))
406 ;; There is no test suite.
408 (home-page "https://byuu.org/higan")
409 (synopsis "Nintendo multi-system emulator")
411 "higan (formerly bsnes) is an emulator for multiple Nintendo video game
412 consoles, including the Nintendo Entertainment System (NES/Famicom), Super
413 Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy
414 Color (GBC), and Game Boy Advance (GBA). It also supports the subsystems
415 Super Game Boy, BS-X Satellaview, and Sufami Turbo.")
416 ;; As noted in these files among more:
417 ;; - icarus/icarus.cpp
418 ;; - higan/emulator/emulator.hpp
419 (license license:gpl3)))
429 (url "https://github.com/mgba-emu/mgba.git")
431 (file-name (git-file-name name version))
433 (base32 "1if82mfaak3696w5d5yshynpzywrxgvg3ifdfi2rwlpvq1gpd429"))
434 (modules '((guix build utils)))
436 ;; Make sure we don't use the bundled software.
440 (let ((lib-subdir (string-append "src/third-party/" subdir)))
441 (delete-file-recursively lib-subdir)))
442 '("libpng" "lzma" "sqlite3" "zlib"))
444 (build-system cmake-build-system)
446 `(#:tests? #f ;no "test" target
448 (list "-DUSE_LZMA=OFF" ;do not use bundled LZMA
449 "-DUSE_LIBZIP=OFF"))) ;use "zlib" instead
450 (native-inputs `(("pkg-config" ,pkg-config)
451 ("qttools" ,qttools)))
452 (inputs `(("ffmpeg" ,ffmpeg)
453 ("imagemagick" ,imagemagick)
456 ("libepoxy" ,libepoxy)
462 ("qtmultimedia" ,qtmultimedia)
466 (home-page "https://mgba.io")
467 (synopsis "Game Boy Advance emulator")
469 "mGBA is an emulator for running Game Boy Advance games. It aims to be
470 faster and more accurate than many existing Game Boy Advance emulators, as
471 well as adding features that other emulators lack. It also supports Game Boy
472 and Game Boy Color games.")
473 ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+, "inih.c" is
474 ;; BSD-3, and "discord-rpc" is Expat.
475 (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3 license:expat))))
477 (define-public sameboy
485 (url "https://github.com/LIJI32/SameBoy.git")
486 (commit (string-append "v" version))))
487 (file-name (git-file-name name version))
489 (base32 "0m5rv2x8qck1kr43xq186pp4kaiay7gd1x775n9qrljcd7z4x6fs"))))
490 (build-system gnu-build-system)
494 ("pkg-config" ,pkg-config)))
498 `(#:tests? #f ; There are no tests
499 #:make-flags `("CC=gcc" "CONF=release"
500 ,(string-append "DATA_DIR="
501 (assoc-ref %outputs "out")
504 (modify-phases %standard-phases
507 (lambda* (#:key outputs #:allow-other-keys)
508 (let* ((out (assoc-ref outputs "out"))
509 (bin (string-append out "/bin"))
510 (data (string-append out "/share/sameboy/")))
511 (with-directory-excursion "build/bin/SDL"
512 (install-file "sameboy" bin)
513 (delete-file "sameboy")
514 (copy-recursively "." data))
516 (home-page "https://sameboy.github.io/")
517 (synopsis "Accurate Game Boy, Game Boy Color and Super Game Boy emulator")
518 (description "SameBoy is a user friendly Game Boy, Game Boy Color
519 and Super Game Boy emulator. SameBoy is accurate and includes a wide
520 range of debugging features. It has all the features one would expect
521 from an emulator---from save states to scaling filters.")
522 (license license:expat)))
524 (define-public mupen64plus-core
526 (name "mupen64plus-core")
532 (url "https://github.com/mupen64plus/mupen64plus-core.git")
534 (file-name (git-file-name name version))
536 (base32 "116fndl6652zrp1r6ag4xv3dzp1x52mlvadj8xwflq07fd5rhri1"))))
537 (build-system gnu-build-system)
539 `(("pkg-config" ,pkg-config)
542 `(("freetype" ,freetype)
550 (modify-phases %standard-phases
551 ;; The mupen64plus build system has no configure phase.
553 ;; Makefile is in a subdirectory.
555 'build 'chdir-to-project-directory
557 (chdir "projects/unix")
559 #:make-flags (let ((out (assoc-ref %outputs "out")))
560 (list "all" (string-append "PREFIX=" out)))
561 ;; There are no tests.
563 ;; As per the Makefile (in projects/unix/Makefile):
564 (supported-systems '("i686-linux" "x86_64-linux"))
565 (home-page "https://www.mupen64plus.org/")
566 (synopsis "Nintendo 64 emulator core library")
568 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
569 which is capable of accurately playing many games. This package contains the
571 (license license:gpl2+)))
573 (define-public mupen64plus-audio-sdl
575 (name "mupen64plus-audio-sdl")
581 (url "https://github.com/mupen64plus/mupen64plus-audio-sdl.git")
583 (file-name (git-file-name name version))
585 (base32 "0z19amfg9vr2pqjjri1ipc7hs681fzjcnb0f9y7bjhp5n8d7p6bb"))))
586 (build-system gnu-build-system)
588 `(("pkg-config" ,pkg-config)
591 `(("mupen64plus-core" ,mupen64plus-core)
595 (modify-phases %standard-phases
596 ;; The mupen64plus build system has no configure phase.
598 ;; Makefile is in a subdirectory.
600 'build 'cd-to-project-dir
602 (chdir "projects/unix"))))
604 (let ((out (assoc-ref %outputs "out"))
605 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
607 (string-append "PREFIX=" out)
608 (string-append "APIDIR=" m64p "/include/mupen64plus")))
609 ;; There are no tests.
611 (home-page "https://www.mupen64plus.org/")
612 (synopsis "Mupen64Plus SDL input plugin")
614 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
615 which is capable of accurately playing many games. This package contains the
617 (license license:gpl2+)))
619 (define-public mupen64plus-input-sdl
621 (name "mupen64plus-input-sdl")
627 (url "https://github.com/mupen64plus/mupen64plus-input-sdl.git")
629 (file-name (git-file-name name version))
631 (base32 "1dyazfbdjycdfslq8jixqiqhziw0rlkvach2r9dz91229jmkyc9c"))))
632 (build-system gnu-build-system)
636 `(("mupen64plus-core" ,mupen64plus-core)
640 (modify-phases %standard-phases
641 ;; The mupen64plus build system has no configure phase.
643 ;; Makefile is in a subdirectory.
645 'build 'cd-to-project-dir
647 (chdir "projects/unix"))))
649 (let ((out (assoc-ref %outputs "out"))
650 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
652 (string-append "PREFIX=" out)
653 (string-append "APIDIR=" m64p "/include/mupen64plus")))
654 ;; There are no tests.
656 (home-page "https://www.mupen64plus.org/")
657 (synopsis "Mupen64Plus SDL input plugin")
659 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
660 which is capable of accurately playing many games. This package contains the
662 (license license:gpl2+)))
664 (define-public mupen64plus-rsp-hle
666 (name "mupen64plus-rsp-hle")
672 (url "https://github.com/mupen64plus/mupen64plus-rsp-hle.git")
674 (file-name (git-file-name name version))
676 (base32 "0pi31qzjjp7aypdvvnz6ms18g09c4gqzxi6328zj8sji94b75gf0"))))
677 (build-system gnu-build-system)
679 `(("mupen64plus-core" ,mupen64plus-core)))
682 (modify-phases %standard-phases
683 ;; The mupen64plus build system has no configure phase.
685 ;; Makefile is in a subdirectory.
687 'build 'cd-to-project-dir
689 (chdir "projects/unix"))))
691 (let ((out (assoc-ref %outputs "out"))
692 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
694 (string-append "PREFIX=" out)
695 (string-append "APIDIR=" m64p "/include/mupen64plus")))
696 ;; There are no tests.
698 (home-page "https://www.mupen64plus.org/")
699 (synopsis "Mupen64Plus SDL input plugin")
701 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
702 which is capable of accurately playing many games. This package contains the
703 high-level emulation (HLE) RSP processor plugin.")
704 (license license:gpl2+)))
706 (define-public mupen64plus-rsp-z64
708 (name "mupen64plus-rsp-z64")
714 (url "https://github.com/mupen64plus/mupen64plus-rsp-z64.git")
716 (file-name (git-file-name name version))
718 (base32 "0nfyjns9k8xbg3aqs7593nfaxvlj72h3l8h467442xlk8ajfcylx"))))
719 (build-system gnu-build-system)
721 `(("mupen64plus-core" ,mupen64plus-core)))
724 (modify-phases %standard-phases
725 ;; The mupen64plus build system has no configure phase.
727 ;; Makefile is in a subdirectory.
729 'build 'cd-to-project-dir
731 (chdir "projects/unix"))))
733 (let ((out (assoc-ref %outputs "out"))
734 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
736 (string-append "PREFIX=" out)
737 (string-append "APIDIR=" m64p "/include/mupen64plus")))
738 ;; There are no tests.
740 (home-page "https://www.mupen64plus.org/")
741 (synopsis "Mupen64Plus SDL input plugin")
743 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
744 which is capable of accurately playing many games. This package contains the
745 Z64 RSP processor plugin.")
746 (license license:gpl2+)))
748 (define-public mupen64plus-video-arachnoid
750 (name "mupen64plus-video-arachnoid")
756 (url "https://github.com/mupen64plus/mupen64plus-video-arachnoid.git")
758 (file-name (git-file-name name version))
760 (base32 "1v9fqwpb6pawr8z5cm2ki7bqkks4iyr5c4jy4v5khj6h8zcv55gc"))))
761 (build-system gnu-build-system)
763 `(("pkg-config" ,pkg-config)
767 ("mupen64plus-core" ,mupen64plus-core)))
770 (modify-phases %standard-phases
771 ;; The mupen64plus build system has no configure phase.
773 ;; Makefile is in a subdirectory.
775 'build 'cd-to-project-dir
777 (chdir "projects/unix"))))
779 (let ((out (assoc-ref %outputs "out"))
780 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
782 (string-append "PREFIX=" out)
783 (string-append "APIDIR=" m64p "/include/mupen64plus")))
784 ;; There are no tests.
786 (home-page "https://www.mupen64plus.org/")
787 (synopsis "Mupen64Plus Rice Video plugin")
789 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
790 which is capable of accurately playing many games. This package contains the
791 Arachnoid video plugin.")
792 (license license:gpl2+)))
794 (define-public mupen64plus-video-glide64
796 (name "mupen64plus-video-glide64")
802 (url "https://github.com/mupen64plus/mupen64plus-video-glide64.git")
804 (file-name (git-file-name name version))
806 (base32 "0qn5za7g7796kh2ag3xpmhbqg0yf71g9liz6ks0rha8pz73lgs01"))))
807 (build-system gnu-build-system)
809 `(("pkg-config" ,pkg-config)
813 ("mupen64plus-core" ,mupen64plus-core)
817 (modify-phases %standard-phases
818 ;; The mupen64plus build system has no configure phase.
820 ;; Makefile is in a subdirectory.
822 'build 'cd-to-project-dir
824 (chdir "projects/unix")))
825 ;; XXX Should be unnecessary with the next release.
829 (substitute* "Makefile"
830 (("SDL_CONFIG = (.*)sdl-config" all prefix)
831 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
833 (let ((out (assoc-ref %outputs "out"))
834 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
836 (string-append "PREFIX=" out)
837 (string-append "APIDIR=" m64p "/include/mupen64plus")))
838 ;; There are no tests.
840 (home-page "https://www.mupen64plus.org/")
841 (synopsis "Mupen64Plus Rice Video plugin")
843 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
844 which is capable of accurately playing many games. This package contains the
845 Glide64 video plugin.")
846 (license license:gpl2+)))
848 (define-public mupen64plus-video-glide64mk2
850 (name "mupen64plus-video-glide64mk2")
856 (url "https://github.com/mupen64plus/mupen64plus-video-glide64mk2.git")
858 (file-name (git-file-name name version))
860 (base32 "08pm28a36dpr0cvr8pzw0n5ksdazp7jqvlmqfy2lwb4dm0cwhkqd"))))
861 (build-system gnu-build-system)
863 `(("pkg-config" ,pkg-config)
869 ("mupen64plus-core" ,mupen64plus-core)
874 (modify-phases %standard-phases
875 ;; The mupen64plus build system has no configure phase.
877 ;; Makefile is in a subdirectory.
879 'build 'cd-to-project-dir
881 (chdir "projects/unix"))))
883 (let ((out (assoc-ref %outputs "out"))
884 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
886 (string-append "PREFIX=" out)
887 (string-append "APIDIR=" m64p "/include/mupen64plus")))
888 ;; There are no tests.
890 (home-page "https://www.mupen64plus.org/")
891 (synopsis "Mupen64Plus Rice Video plugin")
893 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
894 which is capable of accurately playing many games. This package contains the
895 Glide64MK2 video plugin.")
896 (license license:gpl2+)))
898 (define-public mupen64plus-video-rice
900 (name "mupen64plus-video-rice")
906 (url "https://github.com/mupen64plus/mupen64plus-video-rice.git")
908 (file-name (git-file-name name version))
910 (base32 "0rpmbcq67gsj5h5jjis146378qc1mskskvx20y1ikx59yhbamh13"))))
911 (build-system gnu-build-system)
913 `(("pkg-config" ,pkg-config)
918 ("mupen64plus-core" ,mupen64plus-core)
922 (modify-phases %standard-phases
923 ;; The mupen64plus build system has no configure phase.
925 ;; Makefile is in a subdirectory.
927 'build 'cd-to-project-dir
929 (chdir "projects/unix"))))
931 (let ((out (assoc-ref %outputs "out"))
932 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
934 (string-append "PREFIX=" out)
935 (string-append "APIDIR=" m64p "/include/mupen64plus")))
936 ;; There are no tests.
938 (home-page "https://www.mupen64plus.org/")
939 (synopsis "Mupen64Plus Rice Video plugin")
941 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
942 which is capable of accurately playing many games. This package contains the
944 (license license:gpl2+)))
946 (define-public mupen64plus-video-z64
948 (name "mupen64plus-video-z64")
954 (url "https://github.com/mupen64plus/mupen64plus-video-z64.git")
956 (file-name (git-file-name name version))
958 (base32 "04qa2fdd6dakpk2v0d4l80xh9b4h8gm71g80c0wyyxdhmhwk1r9c"))
959 (patches (search-patches "mupen64plus-video-z64-glew-correct-path.patch"))))
960 (build-system gnu-build-system)
962 `(("pkg-config" ,pkg-config)
966 ("mupen64plus-core" ,mupen64plus-core)
970 (modify-phases %standard-phases
971 ;; The mupen64plus build system has no configure phase.
973 ;; Makefile is in a subdirectory.
975 'build 'cd-to-project-dir
977 (chdir "projects/unix")))
978 ;; XXX Should be unnecessary with the next release.
982 (substitute* "Makefile"
983 (("SDL_CONFIG = (.*)sdl-config" all prefix)
984 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
986 (let ((out (assoc-ref %outputs "out"))
987 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
989 (string-append "PREFIX=" out)
990 (string-append "APIDIR=" m64p "/include/mupen64plus")))
991 ;; There are no tests.
993 (home-page "https://www.mupen64plus.org/")
994 (synopsis "Mupen64Plus Z64 video plugin")
996 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
997 which is capable of accurately playing many games. This package contains the
999 (license license:gpl2+)))
1001 (define-public mupen64plus-ui-console
1003 (name "mupen64plus-ui-console")
1009 (url "https://github.com/mupen64plus/mupen64plus-ui-console.git")
1011 (file-name (git-file-name name version))
1013 (base32 "0vrf98qa6a0y3647kslsv644fag233dxh5dcr1yncjiiwickcr5a"))
1014 (patches (search-patches "mupen64plus-ui-console-notice.patch"))))
1015 (build-system gnu-build-system)
1017 `(("pkg-config" ,pkg-config)
1021 ;; Mupen64Plus supports a single data directory and a single plugin
1022 ;; directory in its configuration, yet we need data and plugin files from
1023 ;; a variety of packages. The best way to deal with this is to install
1024 ;; all packages from which data and plugin files are needed into one's
1025 ;; profile, and point the configuration there. Hence, propagate the most
1026 ;; important packages here to save the user from the bother. The patch
1027 ;; mupen64plus-ui-console-notice also gives users instructions on what
1028 ;; they need to do in order to point the configuration to their profile.
1030 `(("mupen64plus-core" ,mupen64plus-core)
1031 ("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl)
1032 ("mupen64plus-input-sdl" ,mupen64plus-input-sdl)
1033 ("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle)
1034 ("mupen64plus-video-glide64" ,mupen64plus-video-glide64)
1035 ("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2)
1036 ("mupen64plus-video-rice" ,mupen64plus-video-rice)))
1039 (modify-phases %standard-phases
1040 ;; The mupen64plus build system has no configure phase.
1042 ;; Makefile is in a subdirectory.
1044 'build 'cd-to-project-dir
1046 (chdir "projects/unix"))))
1048 (let ((out (assoc-ref %outputs "out"))
1049 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
1051 (string-append "PREFIX=" out)
1052 (string-append "APIDIR=" m64p "/include/mupen64plus")
1053 ;; Trailing slash matters here.
1054 (string-append "COREDIR=" m64p "/lib/")))
1055 ;; There are no tests.
1057 (home-page "https://www.mupen64plus.org/")
1058 (synopsis "Mupen64Plus command line user interface")
1060 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
1061 which is capable of accurately playing many games. This package contains the
1062 command line user interface. Installing this package is the easiest way
1063 towards a working Mupen64Plus for casual users.")
1064 (license license:gpl2+)))
1066 (define-public nestopia-ue
1068 (name "nestopia-ue")
1074 (url "https://github.com/rdanbrook/nestopia.git")
1076 (file-name (git-file-name name version))
1078 (base32 "19c8vx5yxbysl0sszk5blfngwacshdgwbf44g1qaxvq8ywiyxmb4"))
1079 (modules '((guix build utils)))
1082 ;; We don't need libretro for the GNU/Linux build.
1083 (delete-file-recursively "libretro")
1085 (build-system cmake-build-system)
1087 `(("pkg-config" ,pkg-config)))
1091 ("libarchive" ,libarchive)
1092 ("libepoxy" ,libepoxy)
1097 (modify-phases %standard-phases
1098 ;; This fixes the file chooser crash that happens with GTK 3.
1099 (add-after 'install 'wrap-program
1100 (lambda* (#:key inputs outputs #:allow-other-keys)
1101 (let* ((out (assoc-ref outputs "out"))
1102 (nestopia (string-append out "/bin/nestopia"))
1103 (gtk (assoc-ref inputs "gtk+"))
1104 (gtk-share (string-append gtk "/share")))
1105 (wrap-program nestopia
1106 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))))))
1107 ;; There are no tests.
1109 (home-page "http://0ldsk00l.ca/nestopia/")
1110 (synopsis "Nintendo Entertainment System (NES/Famicom) emulator")
1112 "Nestopia UE (Undead Edition) is a fork of the Nintendo Entertainment
1113 System (NES/Famicom) emulator Nestopia, with enhancements from members of the
1114 emulation community. It provides highly accurate emulation.")
1115 (license license:gpl2+)))
1117 (define-public retroarch
1125 (url "https://github.com/libretro/RetroArch.git")
1126 (commit (string-append "v" version))))
1127 (file-name (git-file-name name version))
1129 (base32 "0y7rcpz7psf8k3agsrq277jdm651vbnn9xpqvmj2in1a786idya7"))
1131 (search-patches "retroarch-disable-online-updater.patch"))
1132 (modules '((guix build utils)))
1135 ;; Don't suggest using the Online Updater if available: it never
1136 ;; is. This disables translation of this particular message.
1137 (substitute* (find-files "menu/drivers" "\\.c$")
1138 (("msg_hash_to_str\\(MSG_MISSING_ASSETS\\)")
1139 "\"Warning: Missing assets, go get some\""))
1141 (build-system gnu-build-system)
1143 `(#:tests? #f ; no tests
1145 (modify-phases %standard-phases
1147 (lambda* (#:key inputs outputs #:allow-other-keys)
1148 (let* ((out (assoc-ref outputs "out"))
1149 (etc (string-append out "/etc"))
1150 (vulkan (assoc-ref inputs "vulkan-loader"))
1151 (wayland-protocols (assoc-ref inputs "wayland-protocols")))
1152 ;; Hard-code some store file names.
1153 (substitute* "gfx/common/vulkan_common.c"
1154 (("libvulkan.so") (string-append vulkan "/lib/libvulkan.so")))
1155 (substitute* "gfx/common/wayland/generate_wayland_protos.sh"
1156 (("/usr/local/share/wayland-protocols")
1157 (string-append wayland-protocols "/share/wayland-protocols")))
1158 (substitute* "qb/qb.libs.sh"
1159 (("/bin/true") (which "true")))
1162 (substitute* '("libretro-common/file/archive_file_zlib.c"
1163 "libretro-common/streams/trans_stream_zlib.c")
1164 (("<compat/zlib.h>") "<zlib.h>"))
1166 ;; The configure script does not yet accept the extra arguments
1167 ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase.
1170 ,@(if (string-prefix? "armhf" (or (%current-target-system)
1172 '("--enable-neon" "--enable-floathard")
1174 (string-append "--prefix=" out)
1175 (string-append "--global-config-dir=" etc)
1176 "--disable-builtinminiupnpc")))))))
1178 `(("alsa-lib" ,alsa-lib)
1180 ("freetype" ,freetype)
1181 ("libxinerama" ,libxinerama)
1182 ("libxkbcommon" ,libxkbcommon)
1183 ("libxml2" ,libxml2)
1184 ("libxrandr" ,libxrandr)
1187 ("miniupnpc" ,miniupnpc)
1189 ("pulseaudio" ,pulseaudio)
1194 ("vulkan-loader" ,vulkan-loader)
1195 ("wayland" ,wayland)
1198 `(("pkg-config" ,pkg-config)
1199 ("wayland-protocols" ,wayland-protocols)
1201 (home-page "https://www.libretro.com/")
1202 (synopsis "Reference frontend for the libretro API")
1204 "Libretro is a simple but powerful development interface that allows for
1205 the easy creation of emulators, games and multimedia applications that can plug
1206 straight into any libretro-compatible frontend. RetroArch is the official
1207 reference frontend for the libretro API, currently used by most as a modular
1208 multi-system game/emulator system.")
1209 (license license:gpl3+)))
1211 (define-public scummvm
1218 (uri (string-append "http://www.scummvm.org/frs/scummvm/" version
1219 "/scummvm-" version ".tar.xz"))
1221 (base32 "1a6waf1ybp91nwva8g650cljlfb1di4l0jv13vg6yfgkas9pclsp"))))
1222 (build-system gnu-build-system)
1224 `(#:tests? #f ;require "git"
1225 #:configure-flags (list "--enable-release") ;for optimizations
1227 (modify-phases %standard-phases
1228 (add-after 'unpack 'fix-build
1229 ;; XXX: The following works around a build failure introduced when
1230 ;; Fluidsynth was updated to version 2.1. It has been applied
1231 ;; upstream as 68758a879e0c8ecc0d40962516d4e808aa4e15e5 and can be
1232 ;; removed once this commit makes it into a release.
1234 (substitute* "audio/softsynth/fluidsynth.cpp"
1235 (("#include <fluidsynth.h>") "")
1236 (("#include \"common/scummsys.h\"") "#include \"config.h\"")
1237 (("#include \"common/config-manager.h\"" line)
1238 (string-append "#include <fluidsynth.h>\n"
1239 "#include \"common/scummsys.h\"\n"
1243 ;; configure does not work followed by both "SHELL=..." and
1244 ;; "CONFIG_SHELL=..."; set environment variables instead
1245 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1246 (let* ((out (assoc-ref outputs "out"))
1247 (bash (which "bash"))
1248 (flags `(,(string-append "--prefix=" out)
1249 ,@configure-flags)))
1250 (setenv "SHELL" bash)
1251 (setenv "CONFIG_SHELL" bash)
1252 (apply invoke "./configure" flags)))))))
1255 ("pkg-config" ,pkg-config)))
1257 `(("alsa-lib" ,alsa-lib)
1259 ("fluidsynth" ,fluidsynth)
1260 ("freetype" ,freetype)
1263 ("libjpeg-turbo" ,libjpeg-turbo)
1265 ("libmpeg2" ,libmpeg2)
1268 ("libtheora" ,libtheora)
1269 ("libvorbis" ,libvorbis)
1270 ("sdl2" ,(sdl-union (list sdl2 sdl2-net)))
1272 (home-page "https://www.scummvm.org/")
1273 (synopsis "Engine for several graphical adventure games")
1274 (description "ScummVM is a program which allows you to run certain
1275 classic graphical point-and-click adventure games, provided you
1276 already have their data files. The clever part about this: ScummVM
1277 just replaces the executables shipped with the games, allowing you to
1278 play them on systems for which they were never designed!")
1279 (license license:gpl2+)))
1289 (url "https://github.com/mamedev/mame.git")
1290 (commit (apply string-append "mame" (string-split version #\.)))))
1291 (file-name (git-file-name name version))
1293 (base32 "0x3yr195zi7xjr21p1c2l8c0vhg0a0af0mpz4i1w7q7r9krvcvz4"))
1294 (modules '((guix build utils)))
1296 ;; Remove bundled libraries.
1298 (with-directory-excursion "3rdparty"
1299 (for-each delete-file-recursively
1300 '("asio" "expat" "glm" "libflac" "libjpeg" "lua"
1301 "portaudio" "portmidi" "pugixml" "rapidjson" "SDL2"
1302 "SDL2-override" "sqlite3" "utf8proc" "zlib")))
1304 (build-system gnu-build-system)
1308 ;; A 'strict-overflow' error pops up on i686 so disable '-Werror'.
1310 (string-append "QT_HOME=" (assoc-ref %build-inputs "qtbase"))
1311 (string-append "SDL_INI_PATH="
1312 (assoc-ref %outputs "out")
1315 (string-append "USE_SYSTEM_LIB_" (string-upcase lib) "=1"))
1316 '("asio" "expat" "flac" "glm" "jpeg" "lua" "portaudio" "portmidi"
1317 "pugixml" "rapidjson" "sqlite3" "utf8proc" "zlib")))
1318 #:tests? #f ;no test in regular release
1320 (modify-phases %standard-phases
1322 (add-after 'build 'build-documentation
1323 (lambda _ (invoke "make" "-C" "docs" "man" "info")))
1325 ;; Upstream does not provide an installation phase.
1326 (lambda* (#:key outputs #:allow-other-keys)
1327 (let* ((out (assoc-ref outputs "out"))
1328 (share (string-append out "/share/mame")))
1330 (for-each (lambda (dir)
1331 (copy-recursively dir (string-append share "/" dir)))
1332 '("artwork" "bgfx" "ctrlr" "hash" "ini" "language"
1333 "plugins" "samples"))
1334 (let ((keymaps (string-append share "/keymaps")))
1335 (for-each (lambda (file) (install-file file keymaps))
1336 (find-files "keymaps" ".*LINUX\\.map")))
1337 (let ((fonts (string-append share "/fonts")))
1338 (install-file "uismall.bdf" fonts))
1339 (when (file-exists? "mame64")
1340 (rename-file "mame64" "mame"))
1341 (install-file "mame" (string-append out "/bin")))
1343 (add-after 'install 'install-documentation
1344 (lambda* (#:key outputs #:allow-other-keys)
1345 (let* ((out (assoc-ref outputs "out"))
1346 (man (string-append out "/share/man/man1"))
1347 (info (string-append out "/share/info")))
1348 (install-file "docs/build/man/MAME.1" man)
1349 (install-file "docs/build/texinfo/MAME.info" info))
1351 (add-after 'install 'install-ini-file
1352 ;; Generate an ini file so as to set some directories (e.g., roms)
1353 ;; to a writable location, i.e., "$HOME/.mame/" and "$HOME/mame/".
1355 ;; XXX: We need to insert absolute references to the store. It can
1356 ;; be an issue if they leak into user's home directory, e.g., with
1357 ;; "mame -createconfig" and the package is later GC'ed.
1358 (lambda* (#:key outputs #:allow-other-keys)
1359 (let* ((out (assoc-ref outputs "out"))
1360 (share (string-append out "/share/mame"))
1361 (ini (string-append share "/ini")))
1362 (with-output-to-file (string-append ini "/mame.ini")
1365 "inipath $HOME/.mame;~a/ini~@
1366 homepath $HOME/mame~@
1367 rompath $HOME/mame/roms~@
1368 samplepath $HOME/mame/samples;~a/samples~@
1369 cheatpath $HOME/mame/cheat~@
1370 artpath $HOME/mame/artwork;~a/artwork~@
1371 crosshairpath $HOME/mame/crosshair~@
1372 snapshot_directory $HOME/mame/snapshots~@
1374 fontpath $HOME/mame/fonts;~a/fonts~@
1375 ctrlrpath $HOME/mame/ctrlr;~a/ctrlr~@
1377 pluginspath $HOME/mame/plugins;~a/plugins~@
1378 languagepath ~a/language~@
1379 cfg_directory $HOME/.mame/cfg~@
1380 nvram_directory $HOME/.mame/nvram~@
1381 input_directory $HOME/.mame/inp~@
1382 state_directory $HOME/.mame/sta~@
1383 diff_directory $HOME/.mame/diff~@
1384 comment_directory $HOME/.mame/comments~%"
1385 share share share share share share share share
1387 (with-output-to-file (string-append ini "/ui.ini")
1390 "historypath $HOME/mame/history~@
1391 categorypath $HOME/mame/folders~@
1392 cabinets_directory $HOME/mame/cabinets~@
1393 cpanels_directory $HOME/mame/cpanel~@
1394 pcbs_directory $HOME/mame/pcb~@
1395 flyers_directory $HOME/mame/flyers~@
1396 titles_directory $HOME/mame/titles~@
1397 ends_directory $HOME/mame/ends~@
1398 marquees_directory $HOME/mame/marquees~@
1399 artwork_preview_directory $HOME/mame/artpreview~@
1400 bosses_directory $HOME/mame/bosses~@
1401 logos_directory $HOME/mame/logo~@
1402 scores_directory $HOME/mame/scores~@
1403 versus_directory $HOME/mame/versus~@
1404 gameover_directory $HOME/mame/gameover~@
1405 howto_directory $HOME/mame/howto~@
1406 select_directory $HOME/mame/select~@
1407 icons_directory $HOME/mame/icons~@
1408 covers_directory $HOME/mame/covers~@
1409 ui_path $HOME/.mame/ui~%")))
1411 (add-after 'install 'install-desktop-file
1412 (lambda* (#:key outputs #:allow-other-keys)
1413 (let* ((out (assoc-ref outputs "out"))
1414 (desktop (string-append out "/share/applications"))
1415 (executable (string-append out "/bin/mame")))
1417 (with-output-to-file (string-append desktop "/mame.desktop")
1422 Comment=Multi-purpose emulation framework~@
1427 Categories=Game;Emulator;~@
1428 Keywords=Game;Emulator;Arcade;~%"
1432 `(("pkg-config" ,pkg-config)
1433 ("sphinx" ,python-sphinx)
1434 ("sphinxcontrib-svg2pdfconverter" ,python-sphinxcontrib-svg2pdfconverter)
1435 ("texinfo" ,texinfo)))
1437 `(("alsa-lib" ,alsa-lib)
1441 ("fontconfig" ,fontconfig)
1443 ("libjpeg" ,libjpeg-turbo)
1445 ("libxinerama" ,libxinerama)
1447 ("portaudio" ,portaudio)
1448 ("portmidi" ,portmidi)
1449 ("pugixml" ,pugixml)
1450 ("python-wrapper" ,python-wrapper)
1452 ("rapidjson" ,rapidjson)
1453 ("sdl" ,(sdl-union (list sdl2 sdl2-ttf)))
1455 ("utf8proc" ,utf8proc)
1457 (home-page "https://www.mamedev.org")
1458 (synopsis "Multi-purpose emulation framework")
1459 (description "MAME's purpose is to preserve decades of software
1460 history. As electronic technology continues to rush forward, MAME
1461 prevents this important @emph{vintage} software from being lost and
1462 forgotten. This is achieved by documenting the hardware and how it
1463 functions. The source code to MAME serves as this documentation.")
1464 ;; The MAME project as a whole is distributed under the terms of GPL2+.
1465 ;; However, over 90% of the files are under Expat license. Also, artwork,
1466 ;; keymaps, languages and samples are under CC0.
1467 (license (list license:gpl2+ license:expat license:cc0))))
1469 (define-public gnome-arcade
1471 (name "gnome-arcade")
1477 (url "https://github.com/strippato/gnome-arcade")
1478 (commit (string-append "v." version))))
1479 (file-name (git-file-name name version))
1482 "1qc01a62p65qb6mwjfmxqsd6n3rglsfwrjhsp25nr7q54107n55l"))))
1483 (build-system cmake-build-system)
1485 `(#:tests? #f ; No tests.
1486 #:configure-flags (list
1487 (string-append "-DMAME_BIN=\""
1488 (assoc-ref %build-inputs "mame")
1490 (string-append "-DAPP_RES=\""
1491 (assoc-ref %outputs "out")
1492 "/share/gnome-arcade/\""))
1494 (modify-phases %standard-phases
1495 (add-before 'build 'fix-paths
1496 (lambda* (#:key outputs #:allow-other-keys)
1497 (let ((out (assoc-ref outputs "out")))
1499 (substitute* "../source/src/config.c"
1500 (("/usr/share") (string-append out "/share"))))
1503 (lambda* (#:key outputs #:allow-other-keys)
1504 (let* ((out (assoc-ref outputs "out"))
1505 (bin (string-append out "/bin"))
1506 (rom (string-append out "/share/gnome-arcade/data/rom"))
1507 (tile (string-append out "/share/gnome-arcade/data/tile")))
1509 (install-file "../gnome-arcade" bin)
1510 (copy-recursively "../source/res"
1511 (string-append out "/share/gnome-arcade/res"))
1513 (install-file "../source/data/rom/ROM.TXT" rom)
1515 (install-file "../source/data/tile/TILE.TXT" tile))
1518 `(("pkg-config" ,pkg-config)))
1522 ("libevdev" ,libevdev)
1524 ("libarchive" ,libarchive)))
1525 (home-page "https://github.com/strippato/gnome-arcade")
1526 (synopsis "Minimal MAME frontend")
1528 "A minimal GTK+ frontend for MAME, the multi-purpose arcade and console
1530 (license license:gpl3+)))
1532 (define-public pcsxr
1533 ;; No release since 2017.
1534 (let ((commit "6484236cb0281e8040ff6c8078c87899a3407534"))
1537 ;; Version is tagged here: https://github.com/frealgagu/PCSX-Reloaded
1543 (url "https://github.com/pcsxr/PCSX-Reloaded")
1547 "138mayp7zi9v4l3lm5f6xxkds619w1fgg769zm8s45c84jbz7dza"))
1548 (file-name (git-file-name name commit))))
1549 (build-system cmake-build-system)
1551 `(#:tests? #f ;no "test" target
1553 (list "-DSND_BACKEND=pulse"
1554 "-DENABLE_CCDDA='ON'"
1555 "-DUSE_LIBARCHIVE='ON'"
1556 "-DUSE_LIBCDIO='ON'")
1558 (modify-phases %standard-phases
1559 (add-after 'unpack 'cd-subdir
1560 (lambda _ (chdir "pcsxr") #t))
1561 (add-before 'configure 'fix-cdio-lookup
1562 (lambda* (#:key inputs #:allow-other-keys)
1563 (substitute* "cmake/FindCdio.cmake"
1564 (("/usr/include/cdio")
1565 (string-append (assoc-ref inputs "libcdio") "/include/cdio")))
1567 (add-after 'install 'wrap-program
1568 (lambda* (#:key inputs outputs #:allow-other-keys)
1569 (wrap-program (string-append (assoc-ref outputs "out")
1571 ;; For GtkFileChooserDialog.
1572 `("GSETTINGS_SCHEMA_DIR" =
1573 (,(string-append (assoc-ref inputs "gtk+")
1574 "/share/glib-2.0/schemas"))))
1577 `(("pkg-config" ,pkg-config)
1578 ("intltool" ,intltool)
1579 ("glib" ,glib "bin")))
1581 `(("libcdio" ,libcdio)
1586 ("libarchive" ,libarchive)
1587 ("pulseaudio" ,pulseaudio)))
1588 (home-page "https://archive.codeplex.com/?p=pcsxr")
1589 (synopsis "PlayStation emulator")
1591 "A PlayStation emulator based on PCSX-df Project with bugfixes and
1593 (license license:gpl2+))))
1595 (define-public gens-gs
1602 (uri (string-append "https://retrocdn.net/images/6/6d/Gens-gs-r"
1606 "1ha5s6d3y7s9aq9f4zmn9p88109c3mrj36z2w68jhiw5xrxws833"))))
1607 (build-system glib-or-gtk-build-system)
1609 `(#:system "i686-linux"
1611 (modify-phases %standard-phases
1612 (add-after 'unpack 'fix-CFLAGS
1614 ;; Remove GTK API deprecation flags that cause build errors.
1615 (substitute* "configure"
1616 (("GTK_CFLAGS=\"\\$GTK_CFLAGS .*\"") ""))
1619 `(("pkg-config" ,pkg-config)
1624 (home-page "https://segaretro.org/Gens/GS")
1625 (synopsis "Emulator for Sega Genesis/Mega Drive systems")
1627 "Gens/GS is an emulator for the Mega Drive (also known as Sega Genesis),
1628 derived from Gens. Project goals include clean source code, combined features
1629 from various forks of Gens, and improved platform portability.")
1630 (supported-systems '("i686-linux" "x86_64-linux"))
1631 (license license:gpl2+)))