;;; Copyright © 2015, 2018 David Thompson <dthompson2@worcester.edu>
;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2017, 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
-;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2017, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2019 David Wilson <david@daviwil.com>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;;
;;; This file is part of GNU Guix.
;;;
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages emulators)
+ #:use-module (ice-9 match)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (gnu packages base)
#:use-module (gnu packages boost)
#:use-module (gnu packages backup)
+ #:use-module (gnu packages cdrom)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages elf)
#:use-module (gnu packages xorg)
#:use-module (gnu packages web)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu))
(define-public desmume
version "/desmume-" version ".tar.gz"))
(sha256
(base32
- "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs"))))
+ "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs"))
+ (patches (search-patches "desmume-gcc6-fixes.patch"
+ "desmume-gcc7-fixes.patch"))))
(build-system gnu-build-system)
(arguments
;; Enable support for WiFi and microphone.
'(#:tests? #f
#:phases
(modify-phases %standard-phases
- (add-before 'configure 'fixgcc7
- (lambda _
- (unsetenv "C_INCLUDE_PATH")
- (unsetenv "CPLUS_INCLUDE_PATH")
- #t))
(add-before 'configure 'generate-fonts&hardcore-libvulkan-path
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((fontfile
(string-append (assoc-ref inputs "vulkan-loader")
"/lib/libvulkan.so")))
(chdir "docs")
- (invoke "bash" "-c" "g++ -O2 -std=c++11 $(freetype-config \
+ (invoke "bash" "-c" "g++ -O2 $(freetype-config \
--cflags --libs) gc-font-tool.cpp -o gc-font-tool")
(invoke "./gc-font-tool" "a" fontfile "font_western.bin")
(invoke "./gc-font-tool" "s" fontfile "font_japanese.bin")
"-DX11_FOUND=1")))
(native-inputs
`(("pkg-config" ,pkg-config)
- ("gcc" ,gcc-7) ; Building with gcc@5 doesn't work anymore.
- ("gettext" ,gnu-gettext)))
+ ("gettext" ,gettext-minimal)))
(inputs
`(("alsa-lib" ,alsa-lib)
("ao" ,ao)
("alsa-lib" ,alsa-lib)
("glu" ,glu)
("mesa" ,mesa)))
- (home-page "http://www.dosbox.com")
+ (home-page "https://www.dosbox.com")
(synopsis "X86 emulator with CGA/EGA/VGA/etc. graphics and sound")
(description "DOSBox is a DOS-emulator that uses the SDL library. DOSBox
also emulates CPU:286/386 realmode/protected mode, Directory
(license license:gpl2+)))
(define-public emulation-station
- (let ((commit "646bede3d9ec0acf0ae378415edac136774a66c5"))
+ ;; No release for a long time, new commits fix build issues
+ (let ((commit "9cc42adff67946175d2b7e25c6ae69cc374e98a0")
+ (revision "1"))
(package
(name "emulation-station")
- (version "2.0.1")
+ (version (git-version "2.0.1" revision commit))
(source (origin
(method git-fetch) ; no tarball available
(uri (git-reference
(url "https://github.com/Aloshi/EmulationStation.git")
(commit commit))) ; no version tag
- (file-name (string-append name "-" version "-checkout"))
+ (file-name (git-file-name name version))
(sha256
(base32
- "0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v"))))
+ "1cva0ns650v17lfn8in095zci6lc43d23f1x3mlzc41qfqa6mbd1"))))
(build-system cmake-build-system)
(arguments
'(#:tests? #f)) ; no tests
number of video game console emulators. It features an interface that is
usable with any game controller that has at least 4 buttons, theming support,
and a game metadata scraper.")
- (home-page "http://www.emulationstation.org")
+ (home-page "https://emulationstation.org")
(license license:expat))))
(define-public higan
(package
(name "higan")
- (version "106")
+ (version "110")
(source
(origin
- (method url-fetch)
- (uri (string-append
- "https://gitlab.com/higan/higan/repository/archive.tar.gz?ref=v"
- version))
- (file-name (string-append name "-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/higan-emu/higan.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32 "0y42pra0dxzlbkyzcp3r8a39pji2bj3p9fl40425f60af2igr4rw"))
- (patches (search-patches "higan-remove-march-native-flag.patch"))))
+ (base32 "11rvm53c3p2f6zk8xbyv2j51xp8zmqnch7zravhj3fk590qrjrr2"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
("eudev" ,eudev)
("gtk+" ,gtk+-2)
("gtksourceview-2" ,gtksourceview-2)
+ ("libxrandr" ,libxrandr)
("libxv" ,libxv)
("mesa" ,mesa)
("openal" ,openal)
("pulseaudio" ,pulseaudio)
- ("sdl" ,sdl)))
+ ("sdl2" ,sdl2)))
(arguments
'(#:phases
(let ((build-phase (assoc-ref %standard-phases 'build))
(delete 'configure)
(add-before 'build 'chdir-to-higan
(lambda _
- (chdir "higan")))
+ (chdir "higan")
+ #t))
(add-before 'install 'create-/share/applications
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
;; It seems the author forgot to do this in the Makefile.
- (mkdir-p (string-append out "/share/applications")))))
+ (mkdir-p (string-append out "/share/applications"))
+ #t)))
(add-after 'install 'chdir-to-icarus
(lambda _
- (chdir "../icarus")))
+ (chdir "../icarus")
+ #t))
(add-after 'chdir-to-icarus 'build-icarus build-phase)
(add-after 'build-icarus 'install-icarus install-phase)
(add-after 'install-icarus 'wrap-higan-executable
(chmod higan #o555)
;; Second, make sure higan will find icarus in PATH.
(wrap-program higan
- `("PATH" ":" prefix (,bin))))))))
+ `("PATH" ":" prefix (,bin)))
+ #t)))))
#:make-flags
(list "compiler=g++"
(string-append "prefix=" (assoc-ref %outputs "out")))
;; There is no test suite.
#:tests? #f))
- (home-page "http://byuu.org/emulation/higan/")
- (synopsis "Nintendo multi-system emulator")
+ (home-page "https://github.com/higan-emu/higan/")
+ (synopsis "Multi-system emulator")
(description
- "higan (formerly bsnes) is an emulator for multiple Nintendo video game
-consoles, including the Nintendo Entertainment System (NES/Famicom), Super
-Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy
-Color (GBC), and Game Boy Advance (GBA). It also supports the subsystems
-Super Game Boy, BS-X Satellaview, and Sufami Turbo.")
- ;; As noted in these files among more:
- ;; - icarus/icarus.cpp
- ;; - higan/emulator/emulator.hpp
- (license license:gpl3)))
+ "higan is a multi-system emulator with an uncompromising focus on
+accuracy and code readability.
+
+It currently emulates the following systems: Famicom, Famicom Disk System,
+Super Famicom, Super Game Boy, Game Boy, Game Boy Color, Game Boy Advance,
+Game Boy Player, SG-1000, SC-3000, Master System, Game Gear, Mega Drive, Mega
+CD, PC Engine, SuperGrafx, MSX, MSX2, ColecoVision, Neo Geo Pocket, Neo Geo
+Pocket Color, WonderSwan, WonderSwan Color, SwanCrystal, Pocket Challenge
+V2.")
+ (license license:gpl3+)))
(define-public mgba
(package
(name "mgba")
- (version "0.7.3")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/mgba-emu/mgba.git")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1wrmwh50rv8bd328r8cisrihq6h90kx2bfb0vmjfbsd3l1jvgrgm"))
- (modules '((guix build utils)))
- (snippet
- ;; Make sure we don't use the bundled software.
- '(begin
- (for-each
- (lambda (subdir)
- (let ((lib-subdir (string-append "src/third-party/" subdir)))
- (delete-file-recursively lib-subdir)))
- '("libpng" "lzma" "sqlite3" "zlib"))
- #t))))
+ (version "0.8.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mgba-emu/mgba.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1if82mfaak3696w5d5yshynpzywrxgvg3ifdfi2rwlpvq1gpd429"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Make sure we don't use the bundled software.
+ '(begin
+ (for-each
+ (lambda (subdir)
+ (let ((lib-subdir (string-append "src/third-party/" subdir)))
+ (delete-file-recursively lib-subdir)))
+ '("libpng" "lzma" "sqlite3" "zlib"))
+ #t))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f ;no "test" target
#:configure-flags
(list "-DUSE_LZMA=OFF" ;do not use bundled LZMA
"-DUSE_LIBZIP=OFF"))) ;use "zlib" instead
- (native-inputs `(("pkg-config" ,pkg-config)))
+ (native-inputs `(("pkg-config" ,pkg-config)
+ ("qttools" ,qttools)))
(inputs `(("ffmpeg" ,ffmpeg)
("imagemagick" ,imagemagick)
("libedit" ,libedit)
("ncurses" ,ncurses)
("qtbase" ,qtbase)
("qtmultimedia" ,qtmultimedia)
- ("qttools" ,qttools)
("sdl2" ,sdl2)
("sqlite" ,sqlite)
("zlib" ,zlib)))
faster and more accurate than many existing Game Boy Advance emulators, as
well as adding features that other emulators lack. It also supports Game Boy
and Game Boy Color games.")
- ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+ and "inih.c" is
- ;; BSD-3.
- (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3))))
+ ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+, "inih.c" is
+ ;; BSD-3, and "discord-rpc" is Expat.
+ (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3 license:expat))))
+
+(define-public sameboy
+ (package
+ (name "sameboy")
+ (version "0.12.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/LIJI32/SameBoy.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0m5rv2x8qck1kr43xq186pp4kaiay7gd1x775n9qrljcd7z4x6fs"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("rgbds" ,rgbds)
+ ("gcc" ,gcc-9)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("sdl2" ,sdl2)))
+ (arguments
+ `(#:tests? #f ; There are no tests
+ #:make-flags `("CC=gcc" "CONF=release"
+ ,(string-append "DATA_DIR="
+ (assoc-ref %outputs "out")
+ "/share/sameboy/"))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (data (string-append out "/share/sameboy/")))
+ (with-directory-excursion "build/bin/SDL"
+ (install-file "sameboy" bin)
+ (delete-file "sameboy")
+ (copy-recursively "." data))
+ #t))))))
+ (home-page "https://sameboy.github.io/")
+ (synopsis "Accurate Game Boy, Game Boy Color and Super Game Boy emulator")
+ (description "SameBoy is a user friendly Game Boy, Game Boy Color
+and Super Game Boy emulator. SameBoy is accurate and includes a wide
+range of debugging features. It has all the features one would expect
+from an emulator---from save states to scaling filters.")
+ (license license:expat)))
(define-public mupen64plus-core
(package
(define-public retroarch
(package
(name "retroarch")
- (version "1.7.8.3")
+ (version "1.8.1")
(source
(origin
(method git-fetch)
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0lsfiljy6cin3xsxyh80d6y9a77h7h82fcm6k148cd8mndvyxcdn"))))
+ (base32 "0y7rcpz7psf8k3agsrq277jdm651vbnn9xpqvmj2in1a786idya7"))
+ (patches
+ (search-patches "retroarch-disable-online-updater.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Don't suggest using the Online Updater if available: it never
+ ;; is. This disables translation of this particular message.
+ (substitute* (find-files "menu/drivers" "\\.c$")
+ (("msg_hash_to_str\\(MSG_MISSING_ASSETS\\)")
+ "\"Warning: Missing assets, go get some\""))
+ #t))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no tests
(etc (string-append out "/etc"))
(vulkan (assoc-ref inputs "vulkan-loader"))
(wayland-protocols (assoc-ref inputs "wayland-protocols")))
- ;; Hard-code the path to libvulkan.so.
+ ;; Hard-code some store file names.
(substitute* "gfx/common/vulkan_common.c"
(("libvulkan.so") (string-append vulkan "/lib/libvulkan.so")))
(substitute* "gfx/common/wayland/generate_wayland_protos.sh"
(string-append wayland-protocols "/share/wayland-protocols")))
(substitute* "qb/qb.libs.sh"
(("/bin/true") (which "true")))
+
;; Use shared zlib.
(substitute* '("libretro-common/file/archive_file_zlib.c"
"libretro-common/streams/trans_stream_zlib.c")
(("<compat/zlib.h>") "<zlib.h>"))
+
;; The configure script does not yet accept the extra arguments
;; (like ‘CONFIG_SHELL=’) passed by the default configure phase.
(invoke
'("--enable-neon" "--enable-floathard")
'())
(string-append "--prefix=" out)
- (string-append "--global-config-dir=" etc))))))))
+ (string-append "--global-config-dir=" etc)
+ "--disable-builtinminiupnpc")))))))
(inputs
`(("alsa-lib" ,alsa-lib)
("ffmpeg" ,ffmpeg)
("libxrandr" ,libxrandr)
("libxv" ,libxv)
("mesa" ,mesa)
+ ("miniupnpc" ,miniupnpc)
("openal" ,openal)
("pulseaudio" ,pulseaudio)
("python" ,python)
(define-public scummvm
(package
(name "scummvm")
- (version "2.0.0")
+ (version "2.1.2")
(source
(origin
(method url-fetch)
(uri (string-append "http://www.scummvm.org/frs/scummvm/" version
"/scummvm-" version ".tar.xz"))
(sha256
- (base32
- "0q6aiw97wsrf8cjw9vjilzhqqsr2rw2lll99s8i5i9svan6l314p"))))
+ (base32 "1c4fz1nfg0nqnqx9iipayhzcsiqdmfxm2i95nw9dbhshhsdnrhf4"))))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f ;require "git"
+ `(#:tests? #f ;require "git"
#:configure-flags (list "--enable-release") ;for optimizations
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'fix-build
+ ;; XXX: The following works around a build failure introduced when
+ ;; Fluidsynth was updated to version 2.1. It has been applied
+ ;; upstream as 68758a879e0c8ecc0d40962516d4e808aa4e15e5 and can be
+ ;; removed once this commit makes it into a release.
+ (lambda _
+ (substitute* "audio/softsynth/fluidsynth.cpp"
+ (("#include <fluidsynth.h>") "")
+ (("#include \"common/scummsys.h\"") "#include \"config.h\"")
+ (("#include \"common/config-manager.h\"" line)
+ (string-append "#include <fluidsynth.h>\n"
+ "#include \"common/scummsys.h\"\n"
+ line)))
+ #t))
(replace 'configure
;; configure does not work followed by both "SHELL=..." and
;; "CONFIG_SHELL=..."; set environment variables instead
(setenv "CONFIG_SHELL" bash)
(apply invoke "./configure" flags)))))))
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("nasm" ,nasm)
+ ("pkg-config" ,pkg-config)))
(inputs
`(("alsa-lib" ,alsa-lib)
("faad2" ,faad2)
("fluidsynth" ,fluidsynth)
("freetype" ,freetype)
+ ("liba52" ,liba52)
("libflac" ,flac)
("libjpeg-turbo" ,libjpeg-turbo)
("libmad" ,libmad)
("libpng" ,libpng)
("libtheora" ,libtheora)
("libvorbis" ,libvorbis)
- ("nasm" ,nasm)
- ("sdl2" ,sdl2)
+ ("sdl2" ,(sdl-union (list sdl2 sdl2-net)))
("zlib" ,zlib)))
(home-page "https://www.scummvm.org/")
(synopsis "Engine for several graphical adventure games")
(define-public mame
(package
(name "mame")
- (version "0.212")
+ (version "0.220")
(source
(origin
(method git-fetch)
(commit (apply string-append "mame" (string-split version #\.)))))
(file-name (git-file-name name version))
(sha256
- (base32
- "0p3zcb9l624dsy2gyv23ppp1k1iwd1vrg8cbn5v4fx1s44mx7f5c"))
- (patches
- ;; FIXME: Remove once 0.213 is out. Applied upstream as
- ;; 0b5b13cf1e28550b49c387dec93f9801f029e313.
- (search-patches "mame-rapidjson-fix.patch"))
+ (base32 "0x3yr195zi7xjr21p1c2l8c0vhg0a0af0mpz4i1w7q7r9krvcvz4"))
(modules '((guix build utils)))
(snippet
;; Remove bundled libraries.
(arguments
`(#:make-flags
(cons*
+ ;; A 'strict-overflow' error pops up on i686 so disable '-Werror'.
+ "NOWERROR=1"
(string-append "QT_HOME=" (assoc-ref %build-inputs "qtbase"))
(string-append "SDL_INI_PATH="
(assoc-ref %outputs "out")
("flac" ,flac)
("fontconfig" ,fontconfig)
("glm" ,glm)
- ("libjpeg" ,libjpeg-8) ;jpeg_read_header argument error in libjpeg-9
+ ("libjpeg" ,libjpeg-turbo)
("libxi" ,libxi)
("libxinerama" ,libxinerama)
("lua" ,lua)
("sqlite" ,sqlite)
("utf8proc" ,utf8proc)
("zlib" ,zlib)))
- (home-page "http://mamedev.org/")
+ (home-page "https://www.mamedev.org")
(synopsis "Multi-purpose emulation framework")
(description "MAME's purpose is to preserve decades of software
history. As electronic technology continues to rush forward, MAME
;; However, over 90% of the files are under Expat license. Also, artwork,
;; keymaps, languages and samples are under CC0.
(license (list license:gpl2+ license:expat license:cc0))))
+
+(define-public gnome-arcade
+ (package
+ (name "gnome-arcade")
+ (version "0.218.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/strippato/gnome-arcade")
+ (commit (string-append "v." version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1qc01a62p65qb6mwjfmxqsd6n3rglsfwrjhsp25nr7q54107n55l"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; No tests.
+ #:configure-flags (list
+ (string-append "-DMAME_BIN=\""
+ (assoc-ref %build-inputs "mame")
+ "/bin/mame\"")
+ (string-append "-DAPP_RES=\""
+ (assoc-ref %outputs "out")
+ "/share/gnome-arcade/\""))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-paths
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (pk 'cwd (getcwd))
+ (substitute* "../source/src/config.c"
+ (("/usr/share") (string-append out "/share"))))
+ #t))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (rom (string-append out "/share/gnome-arcade/data/rom"))
+ (tile (string-append out "/share/gnome-arcade/data/tile")))
+ (mkdir-p bin)
+ (install-file "../gnome-arcade" bin)
+ (copy-recursively "../source/res"
+ (string-append out "/share/gnome-arcade/res"))
+ (mkdir-p rom)
+ (install-file "../source/data/rom/ROM.TXT" rom)
+ (mkdir-p tile)
+ (install-file "../source/data/tile/TILE.TXT" tile))
+ #t)))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("mame" ,mame)
+ ("gtk" ,gtk+)
+ ("libevdev" ,libevdev)
+ ("libvlc" ,vlc)
+ ("libarchive" ,libarchive)))
+ (home-page "https://github.com/strippato/gnome-arcade")
+ (synopsis "Minimal MAME frontend")
+ (description
+ "A minimal GTK+ frontend for MAME, the multi-purpose arcade and console
+emulator.")
+ (license license:gpl3+)))
+
+(define-public pcsxr
+ ;; No release since 2017.
+ (let ((commit "6484236cb0281e8040ff6c8078c87899a3407534"))
+ (package
+ (name "pcsxr")
+ ;; Version is tagged here: https://github.com/frealgagu/PCSX-Reloaded
+ (version "1.9.95")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pcsxr/PCSX-Reloaded")
+ (commit commit)))
+ (sha256
+ (base32
+ "138mayp7zi9v4l3lm5f6xxkds619w1fgg769zm8s45c84jbz7dza"))
+ (file-name (git-file-name name commit))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ;no "test" target
+ #:configure-flags
+ (list "-DSND_BACKEND=pulse"
+ "-DENABLE_CCDDA='ON'"
+ "-DUSE_LIBARCHIVE='ON'"
+ "-DUSE_LIBCDIO='ON'")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'cd-subdir
+ (lambda _ (chdir "pcsxr") #t))
+ (add-before 'configure 'fix-cdio-lookup
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "cmake/FindCdio.cmake"
+ (("/usr/include/cdio")
+ (string-append (assoc-ref inputs "libcdio") "/include/cdio")))
+ #t))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (wrap-program (string-append (assoc-ref outputs "out")
+ "/bin/pcsxr")
+ ;; For GtkFileChooserDialog.
+ `("GSETTINGS_SCHEMA_DIR" =
+ (,(string-append (assoc-ref inputs "gtk+")
+ "/share/glib-2.0/schemas"))))
+ #t)))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("intltool" ,intltool)
+ ("glib" ,glib "bin")))
+ (inputs
+ `(("libcdio" ,libcdio)
+ ("sdl2" ,sdl2)
+ ("gtk+" ,gtk+)
+ ("ffmpeg" ,ffmpeg)
+ ("libxv" ,libxv)
+ ("libarchive" ,libarchive)
+ ("pulseaudio" ,pulseaudio)))
+ (home-page "https://archive.codeplex.com/?p=pcsxr")
+ (synopsis "PlayStation emulator")
+ (description
+ "A PlayStation emulator based on PCSX-df Project with bugfixes and
+improvements.")
+ (license license:gpl2+))))
+
+(define-public gens-gs
+ (package
+ (name "gens-gs")
+ (version "7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://retrocdn.net/images/6/6d/Gens-gs-r"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1ha5s6d3y7s9aq9f4zmn9p88109c3mrj36z2w68jhiw5xrxws833"))))
+ (build-system glib-or-gtk-build-system)
+ (arguments
+ `(#:system "i686-linux"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-CFLAGS
+ (lambda* _
+ ;; Remove GTK API deprecation flags that cause build errors.
+ (substitute* "configure"
+ (("GTK_CFLAGS=\"\\$GTK_CFLAGS .*\"") ""))
+ #t)))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("nasm" ,nasm)))
+ (inputs
+ `(("sdl" ,sdl)
+ ("gtk" ,gtk+-2)))
+ (home-page "https://segaretro.org/Gens/GS")
+ (synopsis "Emulator for Sega Genesis/Mega Drive systems")
+ (description
+ "Gens/GS is an emulator for the Mega Drive (also known as Sega Genesis),
+derived from Gens. Project goals include clean source code, combined features
+from various forks of Gens, and improved platform portability.")
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (license license:gpl2+)))