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, 2021 Sou Bunnbu <iyzsong@member.fsf.org>
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, 2020 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2017, 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
10 ;;; Copyright © 2017, 2020, 2021 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>
15 ;;; Copyright © 2020 Christopher Howard <christopher@librehacker.com>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages emulators)
33 #:use-module (ice-9 match)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix git-download)
38 #:use-module (guix svn-download)
39 #:use-module (guix utils)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages algebra)
42 #:use-module (gnu packages assembly)
43 #:use-module (gnu packages audio)
44 #:use-module (gnu packages autogen)
45 #:use-module (gnu packages autotools)
46 #:use-module (gnu packages base)
47 #:use-module (gnu packages boost)
48 #:use-module (gnu packages backup)
49 #:use-module (gnu packages cdrom)
50 #:use-module (gnu packages check)
51 #:use-module (gnu packages compression)
52 #:use-module (gnu packages cross-base)
53 #:use-module (gnu packages curl)
54 #:use-module (gnu packages digest)
55 #:use-module (gnu packages elf)
56 #:use-module (gnu packages fonts)
57 #:use-module (gnu packages fontutils)
58 #:use-module (gnu packages freedesktop)
59 #:use-module (gnu packages fribidi)
60 #:use-module (gnu packages game-development)
61 #:use-module (gnu packages gcc)
62 #:use-module (gnu packages gettext)
63 #:use-module (gnu packages gl)
64 #:use-module (gnu packages glib)
65 #:use-module (gnu packages gtk)
66 #:use-module (gnu packages image)
67 #:use-module (gnu packages libedit)
68 #:use-module (gnu packages libusb)
69 #:use-module (gnu packages linux)
70 #:use-module (gnu packages lua)
71 #:use-module (gnu packages maths)
72 #:use-module (gnu packages mp3)
73 #:use-module (gnu packages music)
74 #:use-module (gnu packages ncurses)
75 #:use-module (gnu packages networking)
76 #:use-module (gnu packages pkg-config)
77 #:use-module (gnu packages pulseaudio)
78 #:use-module (gnu packages python)
79 #:use-module (gnu packages qt)
80 #:use-module (gnu packages sdl)
81 #:use-module (gnu packages sphinx)
82 #:use-module (gnu packages sqlite)
83 #:use-module (gnu packages texinfo)
84 #:use-module (gnu packages textutils)
85 #:use-module (gnu packages tls)
86 #:use-module (gnu packages upnp)
87 #:use-module (gnu packages video)
88 #:use-module (gnu packages vulkan)
89 #:use-module (gnu packages wxwidgets)
90 #:use-module (gnu packages xdisorg)
91 #:use-module (gnu packages xiph)
92 #:use-module (gnu packages xml)
93 #:use-module (gnu packages xorg)
94 #:use-module (gnu packages web)
95 #:use-module (guix build-system cmake)
96 #:use-module (guix build-system glib-or-gtk)
97 #:use-module (guix build-system gnu)
98 #:use-module (guix build-system python))
100 (define-public desmume
108 "mirror://sourceforge/desmume/desmume/"
109 version "/desmume-" version ".tar.gz"))
112 "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs"))
113 (patches (search-patches "desmume-gcc6-fixes.patch"
114 "desmume-gcc7-fixes.patch"))))
115 (build-system gnu-build-system)
117 ;; Enable support for WiFi and microphone.
118 `(#:configure-flags '("--enable-wifi"
121 `(("pkg-config" ,pkg-config)
122 ("intltool" ,intltool)))
129 (home-page "http://desmume.org/")
130 (synopsis "Nintendo DS emulator")
132 "DeSmuME is an emulator for the Nintendo DS handheld gaming console.")
133 (license license:gpl2)))
135 ;; Building from recent Git because the official 5.0 release no longer builds.
136 ;; Following commits and revision numbers of beta versions listed at
137 ;; https://dolphin-emu.org/download/.
138 (define-public dolphin-emu
139 (let ((commit "a34823df61df65168aa40ef5e82e44defd4a0138")
143 (version (git-version "5.0" revision commit))
148 (url "https://github.com/dolphin-emu/dolphin")
150 (file-name (git-file-name name version))
151 (modules '((guix build utils)))
154 ;; Remove external stuff we don't need.
155 (for-each (lambda (dir)
156 (delete-file-recursively
157 (string-append "Externals/" dir)))
158 '("LZO" "OpenAL" "Qt" "SFML" "curl" "ffmpeg"
159 "gettext" "hidapi" "libpng" "libusb" "mbedtls"
160 "miniupnpc" "MoltenVK" "zlib"))
162 (for-each delete-file (find-files "." ".*\\.(bin|dsy|exe|jar|rar)$"))
166 "0j6hnj60iai366kl0kdbn1jkwc183l02g65mp2vq4qb2yd4399l1"))))
167 (build-system cmake-build-system)
171 (modify-phases %standard-phases
172 (add-before 'configure 'generate-fonts&hardcore-libvulkan-path
173 (lambda* (#:key inputs outputs #:allow-other-keys)
175 (string-append (assoc-ref inputs "font-wqy-microhei")
176 "/share/fonts/truetype/wqy-microhei.ttc"))
178 (string-append (assoc-ref inputs "vulkan-loader")
179 "/lib/libvulkan.so")))
181 (invoke "bash" "-c" "g++ -O2 $(freetype-config \
182 --cflags --libs) gc-font-tool.cpp -o gc-font-tool")
183 (invoke "./gc-font-tool" "a" fontfile "font_western.bin")
184 (invoke "./gc-font-tool" "s" fontfile "font_japanese.bin")
185 (copy-file "font_japanese.bin" "../Data/Sys/GC/font_japanese.bin")
186 (copy-file "font_western.bin" "../Data/Sys/GC/font_western.bin")
188 (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp"
189 (("\"vulkan\", 1") (string-append "\"vulkan\""))
190 (("\"vulkan\"") (string-append "\"" libvulkan "\""))
191 (("Common::DynamicLibrary::GetVersionedFilename") ""))
194 ;; The FindGTK2 cmake script only checks hardcoded directories for
198 (list (string-append "-DX11_INCLUDE_DIR="
199 (assoc-ref %build-inputs "libx11")
201 (string-append "-DX11_LIBRARIES="
202 (assoc-ref %build-inputs "libx11")
206 `(("pkg-config" ,pkg-config)
207 ("gettext" ,gettext-minimal)))
209 `(("alsa-lib" ,alsa-lib)
215 ("font-wqy-microhei" ,font-wqy-microhei)
216 ("freetype" ,freetype)
222 ("libevdev" ,libevdev)
227 ("libxrandr" ,libxrandr)
229 ("mbedtls-apache" ,mbedtls-apache)
231 ("miniupnpc" ,miniupnpc)
234 ("pulseaudio" ,pulseaudio)
239 ("soundtouch" ,soundtouch)
240 ("vulkan-loader" ,vulkan-loader)
242 (home-page "https://dolphin-emu.org/")
243 (synopsis "Nintendo Wii and GameCube emulator")
245 "Dolphin is an emulator for two Nintendo video game consoles: the
246 GameCube and the Wii. It provides compatibility with all PC controllers,
247 turbo speed, networked multiplayer, and graphical enhancements.")
248 (supported-systems '("x86_64-linux" "aarch64-linux"))
249 ; dolphin/Data/Sys/GC/font_*.bin: Licensed under ASL2.0.
250 (license (list license:gpl2+ license:asl2.0 license:fdl1.2+)))))
252 (define-public dosbox
258 (uri (string-append "https://sourceforge.net/projects/dosbox"
259 "/files/dosbox/" version "/dosbox-"
260 version ".tar.gz/download"))
261 (file-name (string-append name "-" version ".tar.gz"))
264 "02i648i50dwicv1vaql15rccv4g8h5blf5g6inv67lrfxpbkvlf0"))))
265 (build-system gnu-build-system)
267 `(("autoconf" ,autoconf)
268 ("automake" ,automake)))
273 ("alsa-lib" ,alsa-lib)
276 (home-page "https://www.dosbox.com")
277 (synopsis "X86 emulator with CGA/EGA/VGA/etc. graphics and sound")
278 (description "DOSBox is a DOS-emulator that uses the SDL library. DOSBox
279 also emulates CPU:286/386 realmode/protected mode, Directory
280 FileSystem/XMS/EMS, Tandy/Hercules/CGA/EGA/VGA/VESA graphics, a
281 SoundBlaster/Gravis Ultra Sound card for excellent sound compatibility with
283 (license license:gpl2+)))
285 (define-public qtmips
292 (url "https://github.com/cvut/QtMips")
293 (commit (string-append "v" version))))
294 (file-name (git-file-name name version))
297 "1fal7a8y5g0rqqjrk795jh1l50ihz01ppjnrfjrk9vkjbd59szbp"))))
298 (build-system cmake-build-system)
301 (modify-phases %standard-phases
303 (lambda* (#:key outputs #:allow-other-keys)
305 (string-append "PREFIX=" (assoc-ref outputs "out"))
308 (lambda* (#:key tests? #:allow-other-keys)
309 (substitute* "tests/test.sh"
310 (("qtchooser.*") ""))
311 (substitute* '("tests/cpu_trap/test.sh"
312 "tests/registers/test.sh")
313 (("sub-qtmips_cli") "qtmips_cli"))
315 (invoke "tests/run-all.sh")
318 ;; There is no install target.
319 (lambda* (#:key outputs #:allow-other-keys)
320 (let* ((out (assoc-ref outputs "out"))
321 (bin (string-append out "/bin"))
322 (apps (string-append out "/share/applications"))
323 (icons (string-append out "/share/icons/hicolor")))
324 (install-file "qtmips_gui/qtmips_gui" bin)
325 (install-file "qtmips_cli/qtmips_cli" bin)
326 (install-file "data/qtmips.desktop" apps)
327 (install-file "data/icons/qtmips_gui.svg"
328 (string-append icons "/scalable/apps"))
329 (install-file "data/icons/qtmips_gui.png"
330 (string-append icons "/48x48/apps"))
332 #:tests? #f)) ; test suite wants mips toolchain
334 `(("elfutils" ,elfutils)
336 (home-page "https://github.com/cvut/QtMips")
337 (synopsis "MIPS CPU emulator")
338 (description "This package contains a MIPS CPU emulator. The simulator
339 accepts ELF statically linked executables compiled for 32-bit big-endian
340 MIPS target, targeting mips-linux-gnu or mips-elf.")
341 (license license:gpl2+))) ; License file says GPL3
343 (define-public emulation-station
344 ;; No release for a long time, new commits fix build issues
345 (let ((commit "9cc42adff67946175d2b7e25c6ae69cc374e98a0")
348 (name "emulation-station")
349 (version (git-version "2.0.1" revision commit))
351 (method git-fetch) ; no tarball available
353 (url "https://github.com/Aloshi/EmulationStation")
354 (commit commit))) ; no version tag
355 (file-name (git-file-name name version))
358 "1cva0ns650v17lfn8in095zci6lc43d23f1x3mlzc41qfqa6mbd1"))))
359 (build-system cmake-build-system)
361 '(#:tests? #f)) ; no tests
363 `(("alsa-lib" ,alsa-lib)
367 ("freeimage" ,freeimage)
368 ("freetype" ,freetype)
371 (synopsis "Video game console emulator front-end")
372 (description "EmulationStation provides a graphical front-end to a large
373 number of video game console emulators. It features an interface that is
374 usable with any game controller that has at least 4 buttons, theming support,
375 and a game metadata scraper.")
376 (home-page "https://emulationstation.org")
377 (license license:expat))))
387 (url "https://github.com/higan-emu/higan")
388 (commit (string-append "v" version))))
389 (file-name (git-file-name name version))
391 (base32 "11rvm53c3p2f6zk8xbyv2j51xp8zmqnch7zravhj3fk590qrjrr2"))))
392 (build-system gnu-build-system)
394 `(("pkg-config" ,pkg-config)))
396 `(("alsa-lib" ,alsa-lib)
400 ("gtksourceview-2" ,gtksourceview-2)
401 ("libxrandr" ,libxrandr)
405 ("pulseaudio" ,pulseaudio)
409 (let ((build-phase (assoc-ref %standard-phases 'build))
410 (install-phase (assoc-ref %standard-phases 'install)))
411 (modify-phases %standard-phases
412 ;; The higan build system has no configure phase.
414 (add-before 'build 'chdir-to-higan
418 (add-before 'install 'create-/share/applications
419 (lambda* (#:key outputs #:allow-other-keys)
420 (let ((out (assoc-ref outputs "out")))
421 ;; It seems the author forgot to do this in the Makefile.
422 (mkdir-p (string-append out "/share/applications"))
424 (add-after 'install 'chdir-to-icarus
428 (add-after 'chdir-to-icarus 'build-icarus build-phase)
429 (add-after 'build-icarus 'install-icarus install-phase)
430 (add-after 'install-icarus 'wrap-higan-executable
431 (lambda* (#:key inputs outputs #:allow-other-keys)
432 (let* ((out (assoc-ref outputs "out"))
433 (bin (string-append out "/bin"))
434 (higan (string-append bin "/higan"))
435 (higan-original (string-append higan "-original"))
436 (bash (string-append (assoc-ref inputs "bash")
438 (coreutils (assoc-ref inputs "coreutils"))
439 (mkdir (string-append coreutils "/bin/mkdir"))
440 (cp (string-append coreutils "/bin/cp"))
441 (cp-r (string-append cp " -r --no-preserve=mode")))
442 ;; First, have the executable make sure ~/.local/share/higan
443 ;; contains up to date files. Higan insists on looking there
444 ;; for these data files.
445 (rename-file higan higan-original)
446 (with-output-to-file higan
451 ;; higan doesn't respect $XDG_DATA_HOME
452 mkdir " -p ~/.local/share\n"
453 cp-r " " out "/share/higan ~/.local/share\n"
454 "exec " higan-original))))
456 ;; Second, make sure higan will find icarus in PATH.
458 `("PATH" ":" prefix (,bin)))
462 (string-append "prefix=" (assoc-ref %outputs "out")))
463 ;; There is no test suite.
465 (home-page "https://github.com/higan-emu/higan/")
466 (synopsis "Multi-system emulator")
468 "higan is a multi-system emulator with an uncompromising focus on
469 accuracy and code readability.
471 It currently emulates the following systems: Famicom, Famicom Disk System,
472 Super Famicom, Super Game Boy, Game Boy, Game Boy Color, Game Boy Advance,
473 Game Boy Player, SG-1000, SC-3000, Master System, Game Gear, Mega Drive, Mega
474 CD, PC Engine, SuperGrafx, MSX, MSX2, ColecoVision, Neo Geo Pocket, Neo Geo
475 Pocket Color, WonderSwan, WonderSwan Color, SwanCrystal, Pocket Challenge
477 (license license:gpl3+)))
479 (define-public mednafen
486 (uri (string-append "https://mednafen.github.io/releases/files/"
487 "mednafen-" version ".tar.xz"))
489 (base32 "1x7xhxjhwsdbak8l0iyb497f043xkhibk73w96xck4j2bk10fac4"))))
490 (build-system gnu-build-system)
494 ;; "--with-external-mpcdec"
495 "--with-external-lzo")))
497 `(("pkg-config" ,pkg-config)))
500 ;; ("libmpcdec" ,libmpcdec) FIXME: not recognized.
501 ("libsndfile" ,libsndfile)
505 (home-page "https://mednafen.github.io/")
506 (synopsis "Multi-system emulator utilizing OpenGL and SDL")
508 "Mednafen is a portable, utilizing OpenGL and SDL, argument-driven
509 multi-system emulator. Mednafen has the ability to remap hotkey functions and
510 virtual system inputs to a keyboard, a joystick, or both simultaneously. Save
511 states are supported, as is real-time game rewinding. Screen snapshots may be
512 taken, in the PNG file format, at the press of a button. Mednafen can record
513 audiovisual movies in the QuickTime file format, with several different
514 lossless codecs supported.
516 The following systems are supported:
521 @item Neo Geo Pocket (Color)
523 @item GameBoy (Color)
524 @item GameBoy Advance
525 @item Nintendo Entertainment System
526 @item Super Nintendo Entertainment System/Super Famicom
528 @item PC Engine/TurboGrafx 16 (CD)
532 @item Sega Genesis/Megadrive
533 @item Sega Master System
534 @item Sega Saturn (experimental, x86_64 only)
535 @item Sony PlayStation
537 ;; Main license is GPL2+. Some parts are BSD-3.
538 (license (list license:gpl2+ license:bsd-3))))
548 (url "https://github.com/mgba-emu/mgba")
550 (file-name (git-file-name name version))
552 (base32 "163azad5y4zxwzxyrb481rwfc2p86v99pf7nvdr6bavzq98x2z8h"))
553 (modules '((guix build utils)))
555 ;; Make sure we don't use the bundled software.
559 (let ((lib-subdir (string-append "src/third-party/" subdir)))
560 (delete-file-recursively lib-subdir)))
561 '("libpng" "lzma" "sqlite3" "zlib"))
563 (build-system cmake-build-system)
565 `(#:tests? #f ;no "test" target
567 (list "-DUSE_LZMA=OFF" ;do not use bundled LZMA
568 "-DUSE_LIBZIP=OFF"))) ;use "zlib" instead
569 (native-inputs `(("pkg-config" ,pkg-config)
570 ("qttools" ,qttools)))
571 (inputs `(("ffmpeg" ,ffmpeg)
574 ("libepoxy" ,libepoxy)
580 ("qtmultimedia" ,qtmultimedia)
584 (home-page "https://mgba.io")
585 (synopsis "Game Boy Advance emulator")
587 "mGBA is an emulator for running Game Boy Advance games. It aims to be
588 faster and more accurate than many existing Game Boy Advance emulators, as
589 well as adding features that other emulators lack. It also supports Game Boy
590 and Game Boy Color games.")
591 ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+, "inih.c" is
592 ;; BSD-3, and "discord-rpc" is Expat.
593 (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3 license:expat))))
595 (define-public sameboy
603 (url "https://github.com/LIJI32/SameBoy")
604 (commit (string-append "v" version))))
605 (file-name (git-file-name name version))
607 (base32 "04w8lybi7ssnax37ka4qw7pmcm7cgnmk90p9m73zbyp5chgpqqzc"))))
608 (build-system gnu-build-system)
612 ("pkg-config" ,pkg-config)))
616 `(#:tests? #f ; There are no tests
617 #:make-flags `("CC=gcc" "NATIVE_CC=gcc" "CONF=release"
618 ,(string-append "DATA_DIR="
619 (assoc-ref %outputs "out")
622 (modify-phases %standard-phases
625 (lambda* (#:key outputs #:allow-other-keys)
626 (let* ((out (assoc-ref outputs "out"))
627 (bin (string-append out "/bin"))
628 (data (string-append out "/share/sameboy/")))
629 (with-directory-excursion "build/bin/SDL"
630 (install-file "sameboy" bin)
631 (delete-file "sameboy")
632 (copy-recursively "." data))
634 (home-page "https://sameboy.github.io/")
635 (synopsis "Accurate Game Boy, Game Boy Color and Super Game Boy emulator")
636 (description "SameBoy is a user friendly Game Boy, Game Boy Color
637 and Super Game Boy emulator. SameBoy is accurate and includes a wide
638 range of debugging features. It has all the features one would expect
639 from an emulator---from save states to scaling filters.")
640 (license license:expat)))
642 (define-public mupen64plus-core
644 (name "mupen64plus-core")
650 (url "https://github.com/mupen64plus/mupen64plus-core")
652 (file-name (git-file-name name version))
654 (base32 "116fndl6652zrp1r6ag4xv3dzp1x52mlvadj8xwflq07fd5rhri1"))))
655 (build-system gnu-build-system)
657 `(("pkg-config" ,pkg-config)
660 `(("freetype" ,freetype)
668 (modify-phases %standard-phases
669 ;; The mupen64plus build system has no configure phase.
671 ;; Makefile is in a subdirectory.
673 'build 'chdir-to-project-directory
675 (chdir "projects/unix")
677 #:make-flags (let ((out (assoc-ref %outputs "out")))
678 (list "all" (string-append "PREFIX=" out)))
679 ;; There are no tests.
681 ;; As per the Makefile (in projects/unix/Makefile):
682 (supported-systems '("i686-linux" "x86_64-linux"))
683 (home-page "https://www.mupen64plus.org/")
684 (synopsis "Nintendo 64 emulator core library")
686 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
687 which is capable of accurately playing many games. This package contains the
689 (license license:gpl2+)))
691 (define-public mupen64plus-audio-sdl
693 (name "mupen64plus-audio-sdl")
699 (url "https://github.com/mupen64plus/mupen64plus-audio-sdl")
701 (file-name (git-file-name name version))
703 (base32 "0z19amfg9vr2pqjjri1ipc7hs681fzjcnb0f9y7bjhp5n8d7p6bb"))))
704 (build-system gnu-build-system)
706 `(("pkg-config" ,pkg-config)
709 `(("mupen64plus-core" ,mupen64plus-core)
713 (modify-phases %standard-phases
714 ;; The mupen64plus build system has no configure phase.
716 ;; Makefile is in a subdirectory.
718 'build 'cd-to-project-dir
720 (chdir "projects/unix"))))
722 (let ((out (assoc-ref %outputs "out"))
723 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
725 (string-append "PREFIX=" out)
726 (string-append "APIDIR=" m64p "/include/mupen64plus")))
727 ;; There are no tests.
729 (home-page "https://www.mupen64plus.org/")
730 (synopsis "Mupen64Plus SDL input plugin")
732 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
733 which is capable of accurately playing many games. This package contains the
735 (license license:gpl2+)))
737 (define-public mupen64plus-input-sdl
739 (name "mupen64plus-input-sdl")
745 (url "https://github.com/mupen64plus/mupen64plus-input-sdl")
747 (file-name (git-file-name name version))
749 (base32 "1dyazfbdjycdfslq8jixqiqhziw0rlkvach2r9dz91229jmkyc9c"))))
750 (build-system gnu-build-system)
754 `(("mupen64plus-core" ,mupen64plus-core)
758 (modify-phases %standard-phases
759 ;; The mupen64plus build system has no configure phase.
761 ;; Makefile is in a subdirectory.
763 'build 'cd-to-project-dir
765 (chdir "projects/unix"))))
767 (let ((out (assoc-ref %outputs "out"))
768 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
770 (string-append "PREFIX=" out)
771 (string-append "APIDIR=" m64p "/include/mupen64plus")))
772 ;; There are no tests.
774 (home-page "https://www.mupen64plus.org/")
775 (synopsis "Mupen64Plus SDL input plugin")
777 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
778 which is capable of accurately playing many games. This package contains the
780 (license license:gpl2+)))
782 (define-public mupen64plus-rsp-hle
784 (name "mupen64plus-rsp-hle")
790 (url "https://github.com/mupen64plus/mupen64plus-rsp-hle")
792 (file-name (git-file-name name version))
794 (base32 "0pi31qzjjp7aypdvvnz6ms18g09c4gqzxi6328zj8sji94b75gf0"))))
795 (build-system gnu-build-system)
797 `(("mupen64plus-core" ,mupen64plus-core)))
800 (modify-phases %standard-phases
801 ;; The mupen64plus build system has no configure phase.
803 ;; Makefile is in a subdirectory.
805 'build 'cd-to-project-dir
807 (chdir "projects/unix"))))
809 (let ((out (assoc-ref %outputs "out"))
810 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
812 (string-append "PREFIX=" out)
813 (string-append "APIDIR=" m64p "/include/mupen64plus")))
814 ;; There are no tests.
816 (home-page "https://www.mupen64plus.org/")
817 (synopsis "Mupen64Plus SDL input plugin")
819 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
820 which is capable of accurately playing many games. This package contains the
821 high-level emulation (HLE) RSP processor plugin.")
822 (license license:gpl2+)))
824 (define-public mupen64plus-rsp-z64
826 (name "mupen64plus-rsp-z64")
832 (url "https://github.com/mupen64plus/mupen64plus-rsp-z64")
834 (file-name (git-file-name name version))
836 (base32 "0nfyjns9k8xbg3aqs7593nfaxvlj72h3l8h467442xlk8ajfcylx"))))
837 (build-system gnu-build-system)
839 `(("mupen64plus-core" ,mupen64plus-core)))
842 (modify-phases %standard-phases
843 ;; The mupen64plus build system has no configure phase.
845 ;; Makefile is in a subdirectory.
847 'build 'cd-to-project-dir
849 (chdir "projects/unix"))))
851 (let ((out (assoc-ref %outputs "out"))
852 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
854 (string-append "PREFIX=" out)
855 (string-append "APIDIR=" m64p "/include/mupen64plus")))
856 ;; There are no tests.
858 (home-page "https://www.mupen64plus.org/")
859 (synopsis "Mupen64Plus SDL input plugin")
861 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
862 which is capable of accurately playing many games. This package contains the
863 Z64 RSP processor plugin.")
864 (license license:gpl2+)))
866 (define-public mupen64plus-video-arachnoid
868 (name "mupen64plus-video-arachnoid")
874 (url "https://github.com/mupen64plus/mupen64plus-video-arachnoid")
876 (file-name (git-file-name name version))
878 (base32 "1v9fqwpb6pawr8z5cm2ki7bqkks4iyr5c4jy4v5khj6h8zcv55gc"))))
879 (build-system gnu-build-system)
881 `(("pkg-config" ,pkg-config)
885 ("mupen64plus-core" ,mupen64plus-core)))
888 (modify-phases %standard-phases
889 ;; The mupen64plus build system has no configure phase.
891 ;; Makefile is in a subdirectory.
893 'build 'cd-to-project-dir
895 (chdir "projects/unix"))))
897 (let ((out (assoc-ref %outputs "out"))
898 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
900 (string-append "PREFIX=" out)
901 (string-append "APIDIR=" m64p "/include/mupen64plus")))
902 ;; There are no tests.
904 (home-page "https://www.mupen64plus.org/")
905 (synopsis "Mupen64Plus Rice Video plugin")
907 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
908 which is capable of accurately playing many games. This package contains the
909 Arachnoid video plugin.")
910 (license license:gpl2+)))
912 (define-public mupen64plus-video-glide64
914 (name "mupen64plus-video-glide64")
920 (url "https://github.com/mupen64plus/mupen64plus-video-glide64")
922 (file-name (git-file-name name version))
924 (base32 "0qn5za7g7796kh2ag3xpmhbqg0yf71g9liz6ks0rha8pz73lgs01"))))
925 (build-system gnu-build-system)
927 `(("pkg-config" ,pkg-config)
931 ("mupen64plus-core" ,mupen64plus-core)
935 (modify-phases %standard-phases
936 ;; The mupen64plus build system has no configure phase.
938 ;; Makefile is in a subdirectory.
940 'build 'cd-to-project-dir
942 (chdir "projects/unix")))
943 ;; XXX Should be unnecessary with the next release.
947 (substitute* "Makefile"
948 (("SDL_CONFIG = (.*)sdl-config" all prefix)
949 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
951 (let ((out (assoc-ref %outputs "out"))
952 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
954 (string-append "PREFIX=" out)
955 (string-append "APIDIR=" m64p "/include/mupen64plus")))
956 ;; There are no tests.
958 (home-page "https://www.mupen64plus.org/")
959 (synopsis "Mupen64Plus Rice Video plugin")
961 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
962 which is capable of accurately playing many games. This package contains the
963 Glide64 video plugin.")
964 (license license:gpl2+)))
966 (define-public mupen64plus-video-glide64mk2
968 (name "mupen64plus-video-glide64mk2")
974 (url "https://github.com/mupen64plus/mupen64plus-video-glide64mk2")
976 (file-name (git-file-name name version))
978 (base32 "08pm28a36dpr0cvr8pzw0n5ksdazp7jqvlmqfy2lwb4dm0cwhkqd"))))
979 (build-system gnu-build-system)
981 `(("pkg-config" ,pkg-config)
987 ("mupen64plus-core" ,mupen64plus-core)
992 (modify-phases %standard-phases
993 ;; The mupen64plus build system has no configure phase.
995 ;; Makefile is in a subdirectory.
997 'build 'cd-to-project-dir
999 (chdir "projects/unix"))))
1001 (let ((out (assoc-ref %outputs "out"))
1002 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
1004 (string-append "PREFIX=" out)
1005 (string-append "APIDIR=" m64p "/include/mupen64plus")))
1006 ;; There are no tests.
1008 (home-page "https://www.mupen64plus.org/")
1009 (synopsis "Mupen64Plus Rice Video plugin")
1011 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
1012 which is capable of accurately playing many games. This package contains the
1013 Glide64MK2 video plugin.")
1014 (license license:gpl2+)))
1016 (define-public mupen64plus-video-rice
1018 (name "mupen64plus-video-rice")
1024 (url "https://github.com/mupen64plus/mupen64plus-video-rice")
1026 (file-name (git-file-name name version))
1028 (base32 "0rpmbcq67gsj5h5jjis146378qc1mskskvx20y1ikx59yhbamh13"))))
1029 (build-system gnu-build-system)
1031 `(("pkg-config" ,pkg-config)
1034 `(("libpng" ,libpng)
1036 ("mupen64plus-core" ,mupen64plus-core)
1040 (modify-phases %standard-phases
1041 ;; The mupen64plus build system has no configure phase.
1043 ;; Makefile is in a subdirectory.
1045 'build 'cd-to-project-dir
1047 (chdir "projects/unix"))))
1049 (let ((out (assoc-ref %outputs "out"))
1050 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
1052 (string-append "PREFIX=" out)
1053 (string-append "APIDIR=" m64p "/include/mupen64plus")))
1054 ;; There are no tests.
1056 (home-page "https://www.mupen64plus.org/")
1057 (synopsis "Mupen64Plus Rice Video plugin")
1059 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
1060 which is capable of accurately playing many games. This package contains the
1061 Rice Video plugin.")
1062 (license license:gpl2+)))
1064 (define-public mupen64plus-video-z64
1066 (name "mupen64plus-video-z64")
1072 (url "https://github.com/mupen64plus/mupen64plus-video-z64")
1074 (file-name (git-file-name name version))
1076 (base32 "04qa2fdd6dakpk2v0d4l80xh9b4h8gm71g80c0wyyxdhmhwk1r9c"))
1077 (patches (search-patches "mupen64plus-video-z64-glew-correct-path.patch"))))
1078 (build-system gnu-build-system)
1080 `(("pkg-config" ,pkg-config)
1084 ("mupen64plus-core" ,mupen64plus-core)
1088 (modify-phases %standard-phases
1089 ;; The mupen64plus build system has no configure phase.
1091 ;; Makefile is in a subdirectory.
1093 'build 'cd-to-project-dir
1095 (chdir "projects/unix")))
1096 ;; XXX Should be unnecessary with the next release.
1100 (substitute* "Makefile"
1101 (("SDL_CONFIG = (.*)sdl-config" all prefix)
1102 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
1104 (let ((out (assoc-ref %outputs "out"))
1105 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
1107 (string-append "PREFIX=" out)
1108 (string-append "APIDIR=" m64p "/include/mupen64plus")))
1109 ;; There are no tests.
1111 (home-page "https://www.mupen64plus.org/")
1112 (synopsis "Mupen64Plus Z64 video plugin")
1114 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
1115 which is capable of accurately playing many games. This package contains the
1117 (license license:gpl2+)))
1119 (define-public mupen64plus-ui-console
1121 (name "mupen64plus-ui-console")
1127 (url "https://github.com/mupen64plus/mupen64plus-ui-console")
1129 (file-name (git-file-name name version))
1131 (base32 "0vrf98qa6a0y3647kslsv644fag233dxh5dcr1yncjiiwickcr5a"))
1132 (patches (search-patches "mupen64plus-ui-console-notice.patch"))))
1133 (build-system gnu-build-system)
1135 `(("pkg-config" ,pkg-config)
1139 ;; Mupen64Plus supports a single data directory and a single plugin
1140 ;; directory in its configuration, yet we need data and plugin files from
1141 ;; a variety of packages. The best way to deal with this is to install
1142 ;; all packages from which data and plugin files are needed into one's
1143 ;; profile, and point the configuration there. Hence, propagate the most
1144 ;; important packages here to save the user from the bother. The patch
1145 ;; mupen64plus-ui-console-notice also gives users instructions on what
1146 ;; they need to do in order to point the configuration to their profile.
1148 `(("mupen64plus-core" ,mupen64plus-core)
1149 ("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl)
1150 ("mupen64plus-input-sdl" ,mupen64plus-input-sdl)
1151 ("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle)
1152 ("mupen64plus-video-glide64" ,mupen64plus-video-glide64)
1153 ("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2)
1154 ("mupen64plus-video-rice" ,mupen64plus-video-rice)))
1157 (modify-phases %standard-phases
1158 ;; The mupen64plus build system has no configure phase.
1160 ;; Makefile is in a subdirectory.
1162 'build 'cd-to-project-dir
1164 (chdir "projects/unix"))))
1166 (let ((out (assoc-ref %outputs "out"))
1167 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
1169 (string-append "PREFIX=" out)
1170 (string-append "APIDIR=" m64p "/include/mupen64plus")
1171 ;; Trailing slash matters here.
1172 (string-append "COREDIR=" m64p "/lib/")))
1173 ;; There are no tests.
1175 (home-page "https://www.mupen64plus.org/")
1176 (synopsis "Mupen64Plus command line user interface")
1178 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
1179 which is capable of accurately playing many games. This package contains the
1180 command line user interface. Installing this package is the easiest way
1181 towards a working Mupen64Plus for casual users.")
1182 (license license:gpl2+)))
1184 (define-public nestopia-ue
1186 (name "nestopia-ue")
1192 (url "https://github.com/rdanbrook/nestopia")
1194 (file-name (git-file-name name version))
1196 (base32 "19c8vx5yxbysl0sszk5blfngwacshdgwbf44g1qaxvq8ywiyxmb4"))
1197 (modules '((guix build utils)))
1200 ;; We don't need libretro for the GNU/Linux build.
1201 (delete-file-recursively "libretro")
1203 (build-system cmake-build-system)
1205 `(("pkg-config" ,pkg-config)))
1209 ("libarchive" ,libarchive)
1210 ("libepoxy" ,libepoxy)
1215 (modify-phases %standard-phases
1216 ;; This fixes the file chooser crash that happens with GTK 3.
1217 (add-after 'install 'wrap-program
1218 (lambda* (#:key inputs outputs #:allow-other-keys)
1219 (let* ((out (assoc-ref outputs "out"))
1220 (nestopia (string-append out "/bin/nestopia"))
1221 (gtk (assoc-ref inputs "gtk+"))
1222 (gtk-share (string-append gtk "/share")))
1223 (wrap-program nestopia
1224 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))))))
1225 ;; There are no tests.
1227 (home-page "http://0ldsk00l.ca/nestopia/")
1228 (synopsis "Nintendo Entertainment System (NES/Famicom) emulator")
1230 "Nestopia UE (Undead Edition) is a fork of the Nintendo Entertainment
1231 System (NES/Famicom) emulator Nestopia, with enhancements from members of the
1232 emulation community. It provides highly accurate emulation.")
1233 (license license:gpl2+)))
1235 (define-public libretro-lowresnx
1236 (let ((commit "743ab43a6c4a13e0d5363b0d25ac12c7511c6581")
1239 (name "libretro-lowresnx")
1240 (version (git-version "1.1" revision commit))
1244 (url "https://github.com/timoinutilis/lowres-nx")
1246 (file-name (git-file-name name version))
1249 "0r15kb5p5s2jwky6zy4v1j9i95i4rz36p9wxg0g6xdjksf04b5cf"))))
1250 (build-system gnu-build-system)
1252 `(#:tests? #f ; no tests
1253 #:make-flags (list "-C" "platform/LibRetro"
1254 (string-append "CC=" ,(cc-for-target)))
1256 (modify-phases %standard-phases
1257 (delete 'configure) ; no configure script
1259 (lambda* (#:key outputs #:allow-other-keys)
1260 (let* ((out (assoc-ref outputs "out"))
1261 (libretrodir (string-append out "/lib/libretro")))
1262 (install-file "platform/LibRetro/lowresnx_libretro.so"
1265 (home-page "https://lowresnx.inutilis.com/")
1266 (synopsis "Libretro core for LowRES NX")
1267 (description "LowRES NX is a simulated retro game console, which can be
1268 programmed in the classic BASIC language. This package provides a libretro
1269 core allowing the lowRES NX programs to be used with libretro frontends such
1271 (license license:zlib))))
1273 (define-public retroarch
1281 (url "https://github.com/libretro/RetroArch")
1282 (commit (string-append "v" version))))
1283 (file-name (git-file-name name version))
1285 (base32 "1n0dcv85vqrdr79psnf009hi4r2mvsgsjbghrrc9pm5g7ywwwcvp"))
1287 (search-patches "retroarch-LIBRETRO_DIRECTORY.patch"))))
1288 (build-system gnu-build-system)
1290 `(#:tests? #f ; no tests
1292 (modify-phases %standard-phases
1294 (lambda* (#:key inputs outputs #:allow-other-keys)
1295 (let* ((out (assoc-ref outputs "out"))
1296 (etc (string-append out "/etc"))
1297 (vulkan (assoc-ref inputs "vulkan-loader"))
1298 (wayland-protocols (assoc-ref inputs "wayland-protocols")))
1299 ;; Hard-code some store file names.
1300 (substitute* "gfx/common/vulkan_common.c"
1301 (("libvulkan.so") (string-append vulkan "/lib/libvulkan.so")))
1302 (substitute* "gfx/common/wayland/generate_wayland_protos.sh"
1303 (("/usr/local/share/wayland-protocols")
1304 (string-append wayland-protocols "/share/wayland-protocols")))
1305 (substitute* "qb/qb.libs.sh"
1306 (("/bin/true") (which "true")))
1309 (substitute* '("libretro-common/file/archive_file_zlib.c"
1310 "libretro-common/streams/trans_stream_zlib.c")
1311 (("<compat/zlib.h>") "<zlib.h>"))
1313 ;; The configure script does not yet accept the extra arguments
1314 ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase.
1317 ,@(if (string-prefix? "armhf" (or (%current-target-system)
1319 '("--enable-neon" "--enable-floathard")
1321 (string-append "--prefix=" out)
1322 ;; Non-free software are available through the core updater,
1323 ;; disable it. See <https://issues.guix.gnu.org/38360>.
1324 "--disable-update_cores"
1325 "--disable-builtinminiupnpc")))))))
1327 `(("alsa-lib" ,alsa-lib)
1329 ("freetype" ,freetype)
1330 ("libxinerama" ,libxinerama)
1331 ("libxkbcommon" ,libxkbcommon)
1332 ("libxml2" ,libxml2)
1333 ("libxrandr" ,libxrandr)
1336 ("miniupnpc" ,miniupnpc)
1338 ("pulseaudio" ,pulseaudio)
1343 ("vulkan-loader" ,vulkan-loader)
1344 ("wayland" ,wayland)
1347 `(("pkg-config" ,pkg-config)
1348 ("wayland-protocols" ,wayland-protocols)
1350 (native-search-paths
1351 (list (search-path-specification
1352 (variable "LIBRETRO_DIRECTORY")
1353 (separator #f) ; single entry
1354 (files '("lib/libretro")))))
1355 (home-page "https://www.libretro.com/")
1356 (synopsis "Reference frontend for the libretro API")
1358 "Libretro is a simple but powerful development interface that allows for
1359 the easy creation of emulators, games and multimedia applications that can plug
1360 straight into any libretro-compatible frontend. RetroArch is the official
1361 reference frontend for the libretro API, currently used by most as a modular
1362 multi-system game/emulator system.")
1363 (license license:gpl3+)))
1365 (define-public scummvm
1372 (uri (string-append "https://downloads.scummvm.org/frs/scummvm/" version
1373 "/scummvm-" version ".tar.xz"))
1375 (base32 "11vknasm5dna2vqr6gk343qynh7nhsq3kf60zayarn1vb5z6as8l"))))
1376 (build-system gnu-build-system)
1378 `(#:tests? #f ;require "git"
1379 #:configure-flags (list "--enable-release") ;for optimizations
1381 (modify-phases %standard-phases
1383 ;; configure does not work followed by both "SHELL=..." and
1384 ;; "CONFIG_SHELL=..."; set environment variables instead
1385 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1386 (let* ((out (assoc-ref outputs "out"))
1387 (bash (which "bash"))
1388 (flags `(,(string-append "--prefix=" out)
1389 ,@configure-flags)))
1390 (setenv "SHELL" bash)
1391 (setenv "CONFIG_SHELL" bash)
1392 (apply invoke "./configure" flags)))))))
1395 ("pkg-config" ,pkg-config)))
1397 `(("alsa-lib" ,alsa-lib)
1399 ("fluidsynth" ,fluidsynth)
1400 ("freetype" ,freetype)
1401 ("fribidi" ,fribidi)
1404 ("libjpeg-turbo" ,libjpeg-turbo)
1406 ("libmpeg2" ,libmpeg2)
1409 ("libtheora" ,libtheora)
1410 ("libvorbis" ,libvorbis)
1411 ("sdl2" ,(sdl-union (list sdl2 sdl2-net)))
1413 (home-page "https://www.scummvm.org/")
1414 (synopsis "Engine for several graphical adventure games")
1415 (description "ScummVM is a program which allows you to run certain
1416 classic graphical point-and-click adventure games, provided you
1417 already have their data files. The clever part about this: ScummVM
1418 just replaces the executables shipped with the games, allowing you to
1419 play them on systems for which they were never designed!")
1420 (license license:gpl2+)))
1422 (define-public libticables2
1424 (name "libticables2")
1428 (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz")
1431 "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg"))))
1432 (build-system gnu-build-system)
1434 `(#:configure-flags (list "--enable-libusb10")
1436 (modify-phases %standard-phases
1438 (lambda* (#:key source #:allow-other-keys)
1439 (invoke "tar" "xvkf" source)
1440 (invoke "tar" "xvkf"
1441 (string-append "tilibs2/libticables2-"
1442 ,version ".tar.bz2"))
1443 (chdir (string-append "libticables2-" ,version))
1446 `(("autoconf" ,autoconf)
1447 ("autogen" ,autogen)
1448 ("automake" ,automake)
1449 ("gettext" ,gnu-gettext)
1450 ("libtool" ,libtool)
1451 ("pkg-config" ,pkg-config)))
1454 ("libusb" ,libusb)))
1455 (synopsis "Link cable library for TI calculators")
1457 "This package contains libticables, a library for operations on
1458 @acronym{TI, Texas Instruments} calculator link cables.
1460 This is a part of the TiLP project.")
1461 (home-page "http://lpg.ticalc.org/prj_tilp/")
1462 (license license:gpl2+)))
1464 (define-public libticonv
1470 (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz")
1473 "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg"))))
1474 (build-system gnu-build-system)
1476 ;; build fails with out --enable-iconv (...?)
1477 `(#:configure-flags (list "--enable-iconv")
1479 (modify-phases %standard-phases
1481 (lambda* (#:key source #:allow-other-keys)
1482 (invoke "tar" "xvkf" source)
1483 (invoke "tar" "xvkf"
1484 (string-append "tilibs2/libticonv-"
1485 ,version ".tar.bz2"))
1486 (chdir (string-append "libticonv-" ,version))
1489 `(("autoconf" ,autoconf)
1490 ("automake" ,automake)
1491 ("libtool" ,libtool)
1492 ("pkg-config" ,pkg-config)))
1495 (synopsis "Character conversion library for TI calculators")
1497 "This package contains libticonv, a library to support working with
1498 @acronym{TI, Texas Instruments} calculator charsets.
1500 This is a part of the TiLP project.")
1501 (home-page "http://lpg.ticalc.org/prj_tilp/")
1502 (license license:gpl2+)))
1504 (define-public libtifiles2
1506 (name "libtifiles2")
1510 (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz")
1513 "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg"))))
1514 (build-system gnu-build-system)
1517 (modify-phases %standard-phases
1519 (lambda* (#:key source #:allow-other-keys)
1520 (invoke "tar" "xvkf" source)
1521 (invoke "tar" "xvkf"
1522 (string-append "tilibs2/libtifiles2-"
1523 ,version ".tar.bz2"))
1524 (chdir (string-append "libtifiles2-" ,version))
1527 `(("autoconf" ,autoconf)
1528 ("automake" ,automake)
1529 ("gettext" ,gnu-gettext)
1530 ("libtool" ,libtool)
1531 ("pkg-config" ,pkg-config)))
1534 ("libarchive" ,libarchive)
1535 ("libticonv" ,libticonv)))
1536 (synopsis "File functions library for TI calculators")
1538 "This package contains libticonv, a library to support working with
1539 @acronym{TI, Texas Instruments} calculator files.
1541 This is a part of the TiLP project.")
1542 (home-page "http://lpg.ticalc.org/prj_tilp/")
1543 (license license:gpl2+)))
1545 (define-public libticalcs2
1547 (name "libticalcs2")
1551 (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz")
1554 "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg"))))
1555 (build-system gnu-build-system)
1558 (modify-phases %standard-phases
1560 (lambda* (#:key source #:allow-other-keys)
1561 (invoke "tar" "xvkf" source)
1562 (invoke "tar" "xvkf"
1563 (string-append "tilibs2/libticalcs2-"
1564 ,version ".tar.bz2"))
1565 (chdir (string-append "libticalcs2-" ,version))
1568 `(("autoconf" ,autoconf)
1569 ("automake" ,automake)
1570 ("gettext" ,gnu-gettext)
1571 ("libtool" ,libtool)
1572 ("pkg-config" ,pkg-config)))
1575 ("libarchive" ,libarchive)
1576 ("libticables2" ,libticables2)
1577 ("libticonv" ,libticonv)
1578 ("libtifiles2" ,libtifiles2)))
1579 (synopsis "Support library for TI calculators")
1581 "This project aims to develop a multi-platform linking program for use
1582 with all @acronym{TI, Texas Instruments} graphing calculators (TI73 to
1585 This is a part of the TiLP project.")
1586 (home-page "http://lpg.ticalc.org/prj_tilp/")
1587 (license license:gpl2+)))
1597 (url "https://github.com/mamedev/mame")
1598 (commit (apply string-append "mame" (string-split version #\.)))))
1599 (file-name (git-file-name name version))
1601 (base32 "0dk8q2691pycv9mq77h6sdfwjnwdrfwrblf8nwyykrmdawzi56ks"))
1602 (modules '((guix build utils)))
1604 ;; Remove bundled libraries.
1606 (with-directory-excursion "3rdparty"
1607 (for-each delete-file-recursively
1608 '("asio" "expat" "glm" "libflac" "libjpeg" "lua"
1609 "portaudio" "portmidi" "pugixml" "rapidjson" "SDL2"
1610 "SDL2-override" "sqlite3" "utf8proc" "zlib")))
1612 (build-system gnu-build-system)
1616 ;; A 'strict-overflow' error pops up on i686 so disable '-Werror'.
1618 (string-append "QT_HOME=" (assoc-ref %build-inputs "qtbase"))
1619 (string-append "SDL_INI_PATH="
1620 (assoc-ref %outputs "out")
1623 (string-append "USE_SYSTEM_LIB_" (string-upcase lib) "=1"))
1624 '("asio" "expat" "flac" "glm" "jpeg" "lua" "portaudio" "portmidi"
1625 "pugixml" "rapidjson" "sqlite3" "utf8proc" "zlib")))
1626 #:tests? #f ;no test in regular release
1628 (modify-phases %standard-phases
1630 (add-after 'build 'build-documentation
1631 (lambda _ (invoke "make" "-C" "docs" "man" "info")))
1633 ;; Upstream does not provide an installation phase.
1634 (lambda* (#:key outputs #:allow-other-keys)
1635 (let* ((out (assoc-ref outputs "out"))
1636 (share (string-append out "/share/mame")))
1638 (for-each (lambda (dir)
1639 (copy-recursively dir (string-append share "/" dir)))
1640 '("artwork" "bgfx" "ctrlr" "hash" "ini" "language"
1641 "plugins" "samples"))
1642 (let ((keymaps (string-append share "/keymaps")))
1643 (for-each (lambda (file) (install-file file keymaps))
1644 (find-files "keymaps" ".*LINUX\\.map")))
1645 (let ((fonts (string-append share "/fonts")))
1646 (install-file "uismall.bdf" fonts))
1647 (when (file-exists? "mame64")
1648 (rename-file "mame64" "mame"))
1649 (install-file "mame" (string-append out "/bin")))
1651 (add-after 'install 'install-documentation
1652 (lambda* (#:key outputs #:allow-other-keys)
1653 (let* ((out (assoc-ref outputs "out"))
1654 (man (string-append out "/share/man/man1"))
1655 (info (string-append out "/share/info")))
1656 (install-file "docs/build/man/MAME.1" man)
1657 (install-file "docs/build/texinfo/MAME.info" info))
1659 (add-after 'install 'install-ini-file
1660 ;; Generate an ini file so as to set some directories (e.g., roms)
1661 ;; to a writable location, i.e., "$HOME/.mame/" and "$HOME/mame/".
1663 ;; XXX: We need to insert absolute references to the store. It can
1664 ;; be an issue if they leak into user's home directory, e.g., with
1665 ;; "mame -createconfig" and the package is later GC'ed.
1666 (lambda* (#:key outputs #:allow-other-keys)
1667 (let* ((out (assoc-ref outputs "out"))
1668 (share (string-append out "/share/mame"))
1669 (ini (string-append share "/ini")))
1670 (with-output-to-file (string-append ini "/mame.ini")
1673 "inipath $HOME/.mame;~a/ini~@
1674 homepath $HOME/mame~@
1675 rompath $HOME/mame/roms~@
1676 samplepath $HOME/mame/samples;~a/samples~@
1677 cheatpath $HOME/mame/cheat~@
1678 artpath $HOME/mame/artwork;~a/artwork~@
1679 crosshairpath $HOME/mame/crosshair~@
1680 snapshot_directory $HOME/mame/snapshots~@
1682 fontpath $HOME/mame/fonts;~a/fonts~@
1683 ctrlrpath $HOME/mame/ctrlr;~a/ctrlr~@
1685 pluginspath $HOME/mame/plugins;~a/plugins~@
1686 languagepath ~a/language~@
1687 cfg_directory $HOME/.mame/cfg~@
1688 nvram_directory $HOME/.mame/nvram~@
1689 input_directory $HOME/.mame/inp~@
1690 state_directory $HOME/.mame/sta~@
1691 diff_directory $HOME/.mame/diff~@
1692 comment_directory $HOME/.mame/comments~%"
1693 share share share share share share share share
1695 (with-output-to-file (string-append ini "/ui.ini")
1698 "historypath $HOME/mame/history~@
1699 categorypath $HOME/mame/folders~@
1700 cabinets_directory $HOME/mame/cabinets~@
1701 cpanels_directory $HOME/mame/cpanel~@
1702 pcbs_directory $HOME/mame/pcb~@
1703 flyers_directory $HOME/mame/flyers~@
1704 titles_directory $HOME/mame/titles~@
1705 ends_directory $HOME/mame/ends~@
1706 marquees_directory $HOME/mame/marquees~@
1707 artwork_preview_directory $HOME/mame/artpreview~@
1708 bosses_directory $HOME/mame/bosses~@
1709 logos_directory $HOME/mame/logo~@
1710 scores_directory $HOME/mame/scores~@
1711 versus_directory $HOME/mame/versus~@
1712 gameover_directory $HOME/mame/gameover~@
1713 howto_directory $HOME/mame/howto~@
1714 select_directory $HOME/mame/select~@
1715 icons_directory $HOME/mame/icons~@
1716 covers_directory $HOME/mame/covers~@
1717 ui_path $HOME/.mame/ui~%")))
1719 (add-after 'install 'install-desktop-file
1720 (lambda* (#:key outputs #:allow-other-keys)
1721 (let* ((out (assoc-ref outputs "out"))
1722 (desktop (string-append out "/share/applications"))
1723 (executable (string-append out "/bin/mame")))
1725 (with-output-to-file (string-append desktop "/mame.desktop")
1730 Comment=Multi-purpose emulation framework~@
1735 Categories=Game;Emulator;~@
1736 Keywords=Game;Emulator;Arcade;~%"
1740 `(("pkg-config" ,pkg-config)
1741 ("sphinx" ,python-sphinx)
1742 ("sphinxcontrib-svg2pdfconverter" ,python-sphinxcontrib-svg2pdfconverter)
1743 ("texinfo" ,texinfo)))
1745 `(("alsa-lib" ,alsa-lib)
1746 ("asio" ,asio-1.12) ;the bundled copy is at 1.11
1749 ("fontconfig" ,fontconfig)
1751 ("libjpeg" ,libjpeg-turbo)
1753 ("libxinerama" ,libxinerama)
1755 ("portaudio" ,portaudio)
1756 ("portmidi" ,portmidi)
1757 ("pugixml" ,pugixml)
1758 ("python-wrapper" ,python-wrapper)
1760 ("rapidjson" ,rapidjson)
1761 ("sdl" ,(sdl-union (list sdl2 sdl2-ttf)))
1763 ("utf8proc" ,utf8proc)
1765 (home-page "https://www.mamedev.org")
1766 (synopsis "Multi-purpose emulation framework")
1767 (description "MAME's purpose is to preserve decades of software
1768 history. As electronic technology continues to rush forward, MAME
1769 prevents this important @emph{vintage} software from being lost and
1770 forgotten. This is achieved by documenting the hardware and how it
1771 functions. The source code to MAME serves as this documentation.")
1772 ;; The MAME project as a whole is distributed under the terms of GPL2+.
1773 ;; However, over 90% of the files are under Expat license. Also, artwork,
1774 ;; keymaps, languages and samples are under CC0.
1775 (license (list license:gpl2+ license:expat license:cc0))))
1777 (define-public gnome-arcade
1779 (name "gnome-arcade")
1785 (url "https://github.com/strippato/gnome-arcade")
1786 (commit (string-append "v." version))))
1787 (file-name (git-file-name name version))
1790 "1qc01a62p65qb6mwjfmxqsd6n3rglsfwrjhsp25nr7q54107n55l"))))
1791 (build-system cmake-build-system)
1793 `(#:tests? #f ; No tests.
1794 #:configure-flags (list
1795 (string-append "-DMAME_BIN=\""
1796 (assoc-ref %build-inputs "mame")
1798 (string-append "-DAPP_RES=\""
1799 (assoc-ref %outputs "out")
1800 "/share/gnome-arcade/\""))
1802 (modify-phases %standard-phases
1803 (add-before 'build 'fix-paths
1804 (lambda* (#:key outputs #:allow-other-keys)
1805 (let ((out (assoc-ref outputs "out")))
1807 (substitute* "../source/src/config.c"
1808 (("/usr/share") (string-append out "/share"))))
1811 (lambda* (#:key outputs #:allow-other-keys)
1812 (let* ((out (assoc-ref outputs "out"))
1813 (bin (string-append out "/bin"))
1814 (rom (string-append out "/share/gnome-arcade/data/rom"))
1815 (tile (string-append out "/share/gnome-arcade/data/tile")))
1817 (install-file "../gnome-arcade" bin)
1818 (copy-recursively "../source/res"
1819 (string-append out "/share/gnome-arcade/res"))
1821 (install-file "../source/data/rom/ROM.TXT" rom)
1823 (install-file "../source/data/tile/TILE.TXT" tile))
1826 `(("pkg-config" ,pkg-config)))
1830 ("libevdev" ,libevdev)
1832 ("libarchive" ,libarchive)))
1833 (home-page "https://github.com/strippato/gnome-arcade")
1834 (synopsis "Minimal MAME frontend")
1836 "A minimal GTK+ frontend for MAME, the multi-purpose arcade and console
1838 (license license:gpl3+)))
1840 (define-public pcsxr
1841 ;; No release since 2017.
1842 (let ((commit "6484236cb0281e8040ff6c8078c87899a3407534"))
1845 ;; Version is tagged here: https://github.com/frealgagu/PCSX-Reloaded
1851 (url "https://github.com/pcsxr/PCSX-Reloaded")
1855 "138mayp7zi9v4l3lm5f6xxkds619w1fgg769zm8s45c84jbz7dza"))
1856 (file-name (git-file-name name commit))))
1857 (build-system cmake-build-system)
1859 `(#:tests? #f ;no "test" target
1861 (list "-DSND_BACKEND=pulse"
1862 "-DENABLE_CCDDA='ON'"
1863 "-DUSE_LIBARCHIVE='ON'"
1864 "-DUSE_LIBCDIO='ON'")
1866 (modify-phases %standard-phases
1867 (add-after 'unpack 'cd-subdir
1868 (lambda _ (chdir "pcsxr") #t))
1869 (add-before 'configure 'fix-cdio-lookup
1870 (lambda* (#:key inputs #:allow-other-keys)
1871 (substitute* "cmake/FindCdio.cmake"
1872 (("/usr/include/cdio")
1873 (string-append (assoc-ref inputs "libcdio") "/include/cdio")))
1875 (add-after 'install 'wrap-program
1876 (lambda* (#:key inputs outputs #:allow-other-keys)
1877 (wrap-program (string-append (assoc-ref outputs "out")
1879 ;; For GtkFileChooserDialog.
1880 `("GSETTINGS_SCHEMA_DIR" =
1881 (,(string-append (assoc-ref inputs "gtk+")
1882 "/share/glib-2.0/schemas"))))
1885 `(("pkg-config" ,pkg-config)
1886 ("intltool" ,intltool)
1887 ("glib" ,glib "bin")))
1889 `(("libcdio" ,libcdio)
1894 ("libarchive" ,libarchive)
1895 ("pulseaudio" ,pulseaudio)))
1896 (home-page "https://archive.codeplex.com/?p=pcsxr")
1897 (synopsis "PlayStation emulator")
1899 "A PlayStation emulator based on PCSX-df Project with bugfixes and
1901 (license license:gpl2+))))
1903 (define-public gens-gs
1910 (uri (string-append "https://retrocdn.net/images/6/6d/Gens-gs-r"
1914 "1ha5s6d3y7s9aq9f4zmn9p88109c3mrj36z2w68jhiw5xrxws833"))))
1915 (build-system glib-or-gtk-build-system)
1917 `(#:system "i686-linux"
1919 (modify-phases %standard-phases
1920 (add-after 'unpack 'fix-CFLAGS
1922 ;; Remove GTK API deprecation flags that cause build errors.
1923 (substitute* "configure"
1924 (("GTK_CFLAGS=\"\\$GTK_CFLAGS .*\"") ""))
1927 `(("pkg-config" ,pkg-config)
1932 (home-page "https://segaretro.org/Gens/GS")
1933 (synopsis "Emulator for Sega Genesis/Mega Drive systems")
1935 "Gens/GS is an emulator for the Mega Drive (also known as Sega Genesis),
1936 derived from Gens. Project goals include clean source code, combined features
1937 from various forks of Gens, and improved platform portability.")
1938 (supported-systems '("i686-linux" "x86_64-linux"))
1939 (license license:gpl2+)))
1941 (define-public bsnes
1949 (url "https://github.com/bsnes-emu/bsnes")
1950 (commit (string-append "v" version))))
1951 (file-name (git-file-name name version))
1954 "0j054x38fwai61vj36sc04r3zkzay5acq2cgd9zqv5hs51s36g5b"))))
1955 (build-system gnu-build-system)
1957 `(#:make-flags (list "-C" "bsnes"
1958 (string-append "prefix=" (assoc-ref %outputs "out")))
1959 #:tests? #f ; No tests.
1960 #:phases (modify-phases %standard-phases
1961 (delete 'configure))))
1963 `(("pkg-config" ,pkg-config)))
1965 `(("alsa-lib" ,alsa-lib)
1969 ("gtksourceview-2" ,gtksourceview-2)
1970 ("libxrandr" ,libxrandr)
1973 ("pulseaudio" ,pulseaudio)
1975 (home-page "https://bsnes.dev/")
1976 (synopsis "Emulator for the Super Nintendo / Super Famicom systems")
1978 "bsnes is a Super Nintendo / Super Famicom emulator that focuses on
1979 performance, features, and ease of use.")
1980 (license license:gpl3)))
1982 ;; python-pwntools requires a -rc release of unicorn
1983 (define-public unicorn
1986 (if (member (%current-system) '("x86_64-linux" "i686-linux"))
1991 (version "1.0.2-rc4")
1992 ;; NOTE: unicorn ships a bundled QEMU, but with a lot of custom modifications.
1997 (url "https://github.com/unicorn-engine/unicorn")
1999 (file-name (git-file-name name version))
2002 "17nyccgk7hpc4hab24yn57f1xnmr7kq4px98zbp2bkwcrxny8gwy"))))
2003 (outputs '("out" "python"))
2004 ;; The main library is not written in Python, but the build process has
2005 ;; little in common with any defined build system, so we might as well
2006 ;; build on top of python-build-system and make use of all
2007 ;; the Python-specific phases that can be reused.
2008 (build-system python-build-system)
2010 `(#:modules ((srfi srfi-26)
2011 (guix build python-build-system)
2014 (modify-phases %standard-phases
2015 (add-after 'unpack 'install-bindings-to-python-output
2016 (lambda* (#:key outputs #:allow-other-keys)
2017 ;; python-build-system will build the bindings and install them to
2018 ;; the "out" output, so change the build-internal names of the
2021 ;; TODO: remove this once #40469 lands, through the core-updates
2022 ;; holding zone, on master.
2023 (set-car! (assoc "out" outputs) "lib")
2024 (set-car! (assoc "python" outputs) "out")
2026 (add-before 'build 'build-library
2027 (lambda* (#:key inputs #:allow-other-keys)
2029 "-j" (number->string (parallel-job-count))
2032 (add-after 'build-library 'install-library
2033 (lambda* (#:key outputs #:allow-other-keys)
2034 (invoke "make" "install"
2038 (assoc-ref outputs "lib")))))
2039 (add-before 'build 'prepare-bindings
2040 (lambda* (#:key outputs #:allow-other-keys)
2041 (chdir "bindings/python")
2042 ;; Set this environment variable so that the Python bindings
2043 ;; don't build their own copy of the shared object, but use
2044 ;; a dummy value such that the bindings test suite uses the
2045 ;; same mechanism for loading the library as any other user.
2046 (setenv "LIBUNICORN_PATH" "1")
2047 (substitute* "unicorn/unicorn.py"
2048 (("_path_list = \\[.*")
2051 (assoc-ref outputs "lib")
2052 ;; eat the rest of the list
2055 (add-before 'check 'check-library
2056 (lambda* (#:key outputs #:allow-other-keys)
2059 (with-directory-excursion
2060 (string-append "../../tests/" suite)
2061 (invoke "make" "test" "CC=gcc"
2063 '("AS=i686-unknown-linux-gnu-as"
2064 "OBJCOPY=i686-unknown-linux-gnu-objcopy")))))
2065 '("unit" "regress"))
2067 (add-after 'install 'install-samples
2068 (lambda* (#:key outputs #:allow-other-keys)
2069 (let* ((python-samples (find-files "." "sample_.*"))
2070 (c-samples (find-files "../../samples" ".*\\.c"))
2072 (string-append (assoc-ref outputs "out")
2073 "/share/doc/unicorn/samples"))
2075 (string-append (assoc-ref outputs "lib")
2076 "/share/doc/unicorn/samples")))
2077 (for-each (cut install-file <> c-docdir) c-samples)
2078 (for-each (cut install-file <> python-docdir) python-samples)
2081 ;; NOTE: cross-binutils needs to be wrapped with unless-x86, as otherwise
2082 ;; the linker provided by the package will be used, circumventing the ld-wrapper.
2084 `(("assembler-for-tests" ,(cross-binutils "i686-unknown-linux-gnu"))))
2086 ("hexdump-for-tests" ,util-linux)))
2087 (home-page "https://www.unicorn-engine.org")
2088 (synopsis "Unicorn CPU emulator framework")
2090 "Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator
2091 framework based on QEMU.")
2092 (license license:gpl2+))))
2094 (define-public ppsspp
2102 (url "https://github.com/hrydgard/ppsspp")
2103 (commit (string-append "v" version))))
2105 (base32 "1dpxnwvl6jq7z67lbjws4lqc1bxc31xi6ddlmg5n3aig008yi2fp"))
2106 (file-name (git-file-name name version))
2108 (search-patches "ppsspp-disable-upgrade-and-gold.patch"))
2109 (modules '((guix build utils)))
2112 ;; The following is quite a heavy-handed way of unbundling PPSSPP.
2113 ;; There are still a number of external sources, that we don't
2114 ;; remove here. Some may be packaged, others are not.
2115 ;; First, we patch existing sources to include the right headers.
2116 (substitute* (append (find-files "Common" ".*\\.(h|cpp)")
2117 (find-files "Core" ".*\\.(h|cpp)")
2118 (find-files "GPU" ".*\\.(h|cpp)")
2119 (find-files "SDL" ".*\\.(h|cpp)")
2120 (find-files "UI" ".*\\.(h|cpp)"))
2121 ;; These headers are all hard-coded in the original source.
2122 (("ext/cityhash/") "")
2123 (("ext/glslang/glslang/") "glslang/")
2124 (("ext/glslang/") "glslang/")
2125 (("ext/miniupnp/") "")
2126 (("ext/SPIRV-Cross/") "spirv_cross/")
2127 (("ext/vulkan/") "vulkan/")
2128 (("ext/xxhash.h") "xxhash.h")
2129 ;; These definitions do not actually exist in the Vulkan headers,
2130 ;; but PPSSPP defines them in ext/vulkan.
2131 (("VK_FORMAT_BEGIN_RANGE") "VK_FORMAT_UNDEFINED")
2132 (("VK_FORMAT_END_RANGE") "VK_FORMAT_ASTC_12x12_SRGB_BLOCK"))
2133 ;; Next, we patch CMakeLists.
2134 (substitute* "CMakeLists.txt"
2135 ;; Drop unnecessary includes and targets.
2136 (("include_directories\\(ext/glslang\\)") "")
2137 (("include_directories\\(ext/xxhash\\)") "")
2138 (("include_directories\\(ext/cityhash\\)") "")
2139 (("set_target_properties\\(cityhash .*\\)") "")
2140 ;; Fix linking to GLEW.
2141 (("TARGET Ext::GLEW") "true")
2142 (("target_link_libraries\\(native Ext::GLEW\\)")
2143 "find_package(GLEW)\ntarget_link_libraries(native GLEW::GLEW)")
2144 (("Ext::Snappy") "snappy")
2145 ;; Don't search for cityhash/xxhash, we already have them.
2146 (("add_library\\((city|xx)hash STATIC") "if()\nendif(")
2147 (("ext/xxhash\\.[ch]") "")
2148 (("ext/cityhash/.*\\.(cpp|h)") "")
2149 (("if\\(USE_MINIUPNPC\\)" all)
2150 (string-append all "
2151 find_package(miniupnpc)
2152 target_link_libraries(${CoreLibName} miniupnpc ${LDLIBS})
2154 ;; Link all of spirv-cross.
2155 (("spirv-cross-glsl" all)
2157 " spirv-cross-core spirv-cross-cpp"
2158 " spirv-cross-reflect spirv-cross-util")))
2159 (substitute* "ext/CMakeLists.txt"
2160 (("add_subdirectory\\(glew\\)") "")
2161 (("add_subdirectory\\(glslang( [A-Z_]*)*\\)") "")
2162 (("add_subdirectory\\(snappy\\)") "")
2163 (("add_subdirectory\\(SPIRV-Cross-build\\)") ""))
2164 ;; Finally, we can delete the bundled sources.
2165 (for-each delete-file-recursively
2169 "ext/glslang" "ext/glslang-build"
2170 "ext/miniupnp" "ext/miniupnp-build"
2173 "ext/SPIRV-Cross" "ext/SPIRV-Cross-build"
2178 ;; Since we are not including git as an input, PPSSPP is confused
2179 ;; about its version. Let's fix that here.
2180 (substitute* "git-version.cmake"
2181 (("unknown") ,version))))))
2182 (build-system cmake-build-system)
2184 `(("pkg-config" ,pkg-config)
2185 ("python" ,python)))
2187 `(("cityhash" ,cityhash)
2190 ("glslang" ,glslang)
2194 ("miniupnpc" ,miniupnpc)
2197 ("spirv-cross" ,spirv-cross)
2198 ("vulkan-headers" ,vulkan-headers)
2199 ("vulkan-loader" ,vulkan-loader)
2202 ;; TODO: unbundle armips.
2203 ("armips-source" ,(package-source armips))
2205 ,(let ((commit "6bd5b4bc983917ea8402f73c726b46e36f3de0b4"))
2209 (url "https://github.com/hrydgard/ppsspp-lang")
2212 (base32 "08npr3a4xskf85gnlxidl4ksc3rhc7m5rgnj7vsbjvhvw5ap02qx"))
2213 (file-name (git-file-name "ppsspp-lang" commit)))))
2215 ,(let ((commit "1047400eaec6bcbdb2a64d326375ef6a6617c4ac"))
2219 (url "https://github.com/hrydgard/pspautotests")
2222 (base32 "0nxv1lskcr8zbg6nrfai21mxsw0n5vaqhbsa41c3cxfyx5c4w2pg"))
2223 (file-name (git-file-name "pspautotests" commit)))))))
2225 `(#:out-of-source? #f
2226 #:configure-flags (list "-DUSE_DISCORD=OFF"
2227 "-DUSE_SYSTEM_FFMPEG=ON"
2228 "-DUSE_SYSTEM_LIBZIP=ON"
2230 "-DUNITTEST=ON" "-DHEADLESS=ON")
2232 (modify-phases %standard-phases
2233 (add-after 'unpack 'add-external-sources
2234 (lambda* (#:key inputs #:allow-other-keys)
2235 ;; TODO: unbundle armips.
2236 (copy-recursively (assoc-ref inputs "armips-source")
2238 ;; Some tests are externalised, so we add them here.
2239 (copy-recursively (assoc-ref inputs "tests")
2241 ;; i18n is externalised, so we add it here.
2242 (copy-recursively (assoc-ref inputs "lang")
2245 (add-after 'unpack 'fix-unittest-build
2247 (substitute* "CMakeLists.txt"
2248 (("unittest/TestVertexJit.cpp" all)
2249 (string-append all " unittest/TestShaderGenerators.cpp")))
2250 (substitute* "unittest/TestVertexJit.cpp"
2251 (("#include \"unittest/UnitTest.h\"" all)
2252 (string-append all "\n#include <cmath>")))
2257 (lambda (t) (invoke "./unitTest" t))
2258 '("Arm64Emitter" "ArmEmitter" "X64Emitter" "VertexJit" "Asin"
2259 "SinCos" #|"VFPUSinCos" SIGSEGV|# "MathUtil" "Parsers" "Jit"
2260 "MatrixTranspose" "ParseLBN" "QuickTexHash" "CLZ"
2261 #|"ShaderGenerators"|#))
2262 (invoke "python3" "test.py" "-g")
2265 (lambda* (#:key inputs outputs #:allow-other-keys)
2266 (let* ((out (assoc-ref outputs "out"))
2267 (bin/ppsspp (string-append out "/bin/ppsspp"))
2268 (share (string-append out "/share/ppsspp")))
2269 (copy-recursively "icons/hicolor"
2270 (string-append out "/share/icons/hicolor"))
2271 (install-file "PPSSPPSDL" share)
2272 (copy-recursively "assets" (string-append share "/assets"))
2274 (make-desktop-entry-file
2275 (string-append out "/share/applications/ppsspp.desktop")
2277 #:exec (string-append share "/PPSSPPSDL")
2279 (mkdir-p (string-append out "/bin"))
2280 (with-output-to-file bin/ppsspp
2282 (format #t "#!~a~%exec ~a/PPSSPPSDL \"$@\""
2283 (which "sh") share)))
2284 (chmod bin/ppsspp #o755)
2286 (home-page "https://www.ppsspp.org/")
2287 (synopsis "PSP emulator")
2289 "PPSSPP is a ``high-level'' emulator simulating the PSP operating
2291 (license license:gpl2+)))