gnu: vulkan-loader: Update URL and change name.
[jackhill/guix/guix.git] / gnu / packages / emulators.scm
CommitLineData
e5f9ec8b 1;;; GNU Guix --- Functional package management for GNU
9af704c5
RH
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>
e89bfc2d 8;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
4c40ed9d 9;;; Copyright © 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
9af704c5
RH
10;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
11;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
e5f9ec8b
RH
12;;;
13;;; This file is part of GNU Guix.
14;;;
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages emulators)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
9af704c5 31 #:use-module (guix download)
e5f9ec8b 32 #:use-module (guix git-download)
9af704c5
RH
33 #:use-module (guix svn-download)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages algebra)
4c40ed9d 36 #:use-module (gnu packages assembly)
e5f9ec8b 37 #:use-module (gnu packages audio)
9af704c5
RH
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages boost)
41 #:use-module (gnu packages backup)
e5f9ec8b
RH
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages curl)
9af704c5 44 #:use-module (gnu packages databases)
e5f9ec8b
RH
45 #:use-module (gnu packages fonts)
46 #:use-module (gnu packages fontutils)
9af704c5 47 #:use-module (gnu packages freedesktop)
e5f9ec8b 48 #:use-module (gnu packages game-development)
cbf58afa 49 #:use-module (gnu packages gcc)
e5f9ec8b
RH
50 #:use-module (gnu packages gettext)
51 #:use-module (gnu packages gl)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages image)
9af704c5
RH
55 #:use-module (gnu packages imagemagick)
56 #:use-module (gnu packages libedit)
e5f9ec8b
RH
57 #:use-module (gnu packages libusb)
58 #:use-module (gnu packages linux)
4c40ed9d 59 #:use-module (gnu packages mp3)
9af704c5 60 #:use-module (gnu packages ncurses)
e5f9ec8b
RH
61 #:use-module (gnu packages pkg-config)
62 #:use-module (gnu packages pulseaudio)
9af704c5 63 #:use-module (gnu packages python)
e5f9ec8b
RH
64 #:use-module (gnu packages qt)
65 #:use-module (gnu packages sdl)
66 #:use-module (gnu packages tls)
67 #:use-module (gnu packages upnp)
68 #:use-module (gnu packages video)
9af704c5 69 #:use-module (gnu packages vulkan)
e5f9ec8b 70 #:use-module (gnu packages wxwidgets)
9af704c5 71 #:use-module (gnu packages xdisorg)
e5f9ec8b 72 #:use-module (gnu packages xiph)
9af704c5 73 #:use-module (gnu packages xml)
e5f9ec8b 74 #:use-module (gnu packages xorg)
9af704c5
RH
75 #:use-module (guix build-system cmake)
76 #:use-module (guix build-system gnu))
77
78(define-public desmume
79 (package
80 (name "desmume")
81 (version "0.9.11")
82 (source
83 (origin
84 (method url-fetch)
85 (uri (string-append
86 "mirror://sourceforge/desmume/desmume/"
87 version "/desmume-" version ".tar.gz"))
88 (sha256
89 (base32
90 "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs"))))
91 (build-system gnu-build-system)
92 (arguments
93 ;; Enable support for WiFi and microphone.
94 `(#:configure-flags '("--enable-wifi"
95 "--enable-openal")))
96 (native-inputs
97 `(("pkg-config" ,pkg-config)
98 ("intltool" ,intltool)))
99 (inputs
100 `(("zlib" ,zlib)
101 ("sdl" ,sdl)
102 ("glib" ,glib)
103 ("gtk+" ,gtk+-2)
104 ("glu" ,glu)))
105 (home-page "http://desmume.org/")
106 (synopsis "Nintendo DS emulator")
107 (description
108 "DeSmuME is an emulator for the Nintendo DS handheld gaming console.")
109 (license license:gpl2)))
e5f9ec8b
RH
110
111;; Building from recent Git because the official 5.0 release no longer builds.
112(define-public dolphin-emu
cbf58afa
RH
113 (let ((commit "47fd8c6eff4cdea7660d0fa78040f98d1d4fa136")
114 (revision "1"))
e5f9ec8b
RH
115 (package
116 (name "dolphin-emu")
117 (version (git-version "5.0" revision commit))
118 (source
119 (origin
120 (method git-fetch)
121 (uri (git-reference
122 (url "https://github.com/dolphin-emu/dolphin.git")
123 (commit commit)))
124 (file-name (git-file-name name version))
85280804
EF
125 (modules '((guix build utils)))
126 (snippet
127 '(begin
128 ;; Remove external stuff we don't need.
129 (for-each (lambda (dir)
130 (delete-file-recursively
131 (string-append "Externals/" dir)))
132 '("LZO" "OpenAL" "Qt" "SFML" "SOIL" "curl" "ffmpeg"
133 "gettext" "hidapi" "libpng" "libusb" "mbedtls"
134 "miniupnpc" "wxWidgets3" "zlib"))
135 ;; Clean up source.
136 (for-each delete-file (find-files "." ".*\\.(bin|dsy|exe|jar|rar)$"))
137 #t))
e5f9ec8b
RH
138 (sha256
139 (base32
cbf58afa 140 "1gp2sshnr0dswdawxd5ix96nksp435b52bqvpjx8pmn523k29zsw"))))
e5f9ec8b
RH
141 (build-system cmake-build-system)
142 (arguments
143 '(#:tests? #f
144 ;; The FindGTK2 cmake script only checks hardcoded directories for
145 ;; glib/gtk headers.
146
147 #:phases
148 (modify-phases %standard-phases
cbf58afa
RH
149 (add-before 'configure 'fixgcc7
150 (lambda _
151 (unsetenv "C_INCLUDE_PATH")
152 (unsetenv "CPLUS_INCLUDE_PATH")))
6bebad77 153 (add-before 'configure 'generate-fonts&hardcore-libvulkan-path
e5f9ec8b
RH
154 (lambda* (#:key inputs outputs #:allow-other-keys)
155 (let ((fontfile
156 (string-append (assoc-ref inputs "font-wqy-microhei")
6bebad77
RH
157 "/share/fonts/truetype/wqy-microhei.ttc"))
158 (libvulkan
e6fcf903 159 (string-append (assoc-ref inputs "vulkan-loader")
6bebad77 160 "/lib/libvulkan.so")))
e5f9ec8b
RH
161 (chdir "docs")
162 (invoke "bash" "-c" "g++ -O2 -std=c++11 $(freetype-config \
163--cflags --libs) gc-font-tool.cpp -o gc-font-tool")
164 (invoke "./gc-font-tool" "a" fontfile "font_western.bin")
165 (invoke "./gc-font-tool" "s" fontfile "font_japanese.bin")
166 (copy-file "font_japanese.bin" "../Data/Sys/GC/font_japanese.bin")
167 (copy-file "font_western.bin" "../Data/Sys/GC/font_western.bin")
168 (chdir "..")
6bebad77
RH
169 (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp"
170 (("libvulkan.so") libvulkan))
e5f9ec8b
RH
171 #t))))
172
173 #:configure-flags
174 (list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
175 (assoc-ref %build-inputs "gtk+")
176 "/lib/gtk-2.0/include")
177 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
178 (assoc-ref %build-inputs "glib")
179 "/lib/glib-2.0/include")
180 (string-append "-DX11_INCLUDE_DIR="
181 (assoc-ref %build-inputs "libx11")
182 "/include")
183 (string-append "-DX11_LIBRARIES="
184 (assoc-ref %build-inputs "libx11")
185 "/lib/libX11.so")
186 "-DX11_FOUND=1")))
e5f9ec8b
RH
187 (native-inputs
188 `(("pkg-config" ,pkg-config)
cbf58afa 189 ("gcc" ,gcc-7) ; Building with gcc@5 doesn't work anymore.
e5f9ec8b
RH
190 ("gettext" ,gnu-gettext)))
191 (inputs
192 `(("alsa-lib" ,alsa-lib)
193 ("ao" ,ao)
194 ("bluez" ,bluez)
195 ("curl" ,curl)
196 ("eudev" ,eudev)
06079c19 197 ("ffmpeg" ,ffmpeg-3.4)
e5f9ec8b
RH
198 ("font-wqy-microhei" ,font-wqy-microhei)
199 ("freetype" ,freetype)
200 ("glew" ,glew)
201 ("glib" ,glib)
202 ("glu" ,glu)
203 ("gtk+" ,gtk+-2)
204 ("hidapi" ,hidapi)
205 ("libevdev" ,libevdev)
206 ("libpng" ,libpng)
207 ("libusb" ,libusb)
208 ("libx11" ,libx11)
209 ("libxi" ,libxi)
210 ("libxrandr" ,libxrandr)
211 ("lzo" ,lzo)
212 ("mbedtls-apache" ,mbedtls-apache)
213 ("mesa" ,mesa)
214 ("miniupnpc" ,miniupnpc)
215 ("openal" ,openal)
216 ("pulseaudio" ,pulseaudio)
217 ("qtbase" ,qtbase)
218 ("sdl2" ,sdl2)
219 ("sfml" ,sfml)
220 ("soil" ,soil)
221 ("soundtouch" ,soundtouch)
e6fcf903 222 ("vulkan-loader" ,vulkan-loader)
e5f9ec8b
RH
223 ("wxwidgets" ,wxwidgets-gtk2-3.1)
224 ("zlib" ,zlib)))
225 (home-page "https://dolphin-emu.org/")
226 (synopsis "Nintendo Wii and GameCube emulator")
227 (description
228 "Dolphin is an emulator for two Nintendo video game consoles: the
229GameCube and the Wii. It provides compatibility with all PC controllers,
230turbo speed, networked multiplayer, and graphical enhancements.")
e89bfc2d 231 (supported-systems '("x86_64-linux" "aarch64-linux"))
e5f9ec8b
RH
232 ; dolphin/Data/Sys/GC/font_*.bin: Licensed under ASL2.0.
233 (license (list license:gpl2+ license:asl2.0 license:fdl1.2+)))))
9af704c5
RH
234
235(define-public dosbox
236 (package
237 (name "dosbox")
238 (version "0.74.svn3947")
239 (source (origin
240 (method svn-fetch)
241 (uri (svn-reference
242 (url "http://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk/")
243 (revision 3947)))
244 (file-name (string-append name "-" version "-checkout"))
245 ;; Use SVN head, since the last release (2010) is incompatible
246 ;; with GCC 4.8+ (see
247 ;; <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624976>).
248 (sha256
249 (base32
250 "1p918j6090d1nkvgq7ifvmn506zrdmyi32y7p3ms40d5ssqjg8fj"))))
251 (build-system gnu-build-system)
252 (arguments
253 `(#:phases (modify-phases %standard-phases
254 (add-after
255 'unpack 'autogen.sh
256 (lambda _
257 (zero? (system* "sh" "autogen.sh")))))))
258 (native-inputs
259 `(("autoconf" ,autoconf)
260 ("automake" ,automake)))
261 (inputs
262 `(("sdl" ,sdl)
263 ("libpng" ,libpng)
264 ("zlib" ,zlib)
265 ("alsa-lib" ,alsa-lib)
266 ("glu" ,glu)
267 ("mesa" ,mesa)))
268 (home-page "http://www.dosbox.com")
269 (synopsis "X86 emulator with CGA/EGA/VGA/etc. graphics and sound")
270 (description "DOSBox is a DOS-emulator that uses the SDL library. DOSBox
271also emulates CPU:286/386 realmode/protected mode, Directory
272FileSystem/XMS/EMS, Tandy/Hercules/CGA/EGA/VGA/VESA graphics, a
273SoundBlaster/Gravis Ultra Sound card for excellent sound compatibility with
274older games.")
275 (license license:gpl2+)))
276
277(define-public emulation-station
278 (let ((commit "646bede3d9ec0acf0ae378415edac136774a66c5"))
279 (package
280 (name "emulation-station")
281 (version "2.0.1")
282 (source (origin
283 (method git-fetch) ; no tarball available
284 (uri (git-reference
285 (url "https://github.com/Aloshi/EmulationStation.git")
286 (commit commit))) ; no version tag
287 (file-name (string-append name "-" version "-checkout"))
288 (sha256
289 (base32
290 "0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v"))))
291 (build-system cmake-build-system)
292 (arguments
293 '(#:tests? #f)) ; no tests
294 (inputs
295 `(("alsa-lib" ,alsa-lib)
296 ("boost" ,boost)
297 ("curl" ,curl)
298 ("eigin" ,eigen)
299 ("freeimage" ,freeimage)
300 ("freetype" ,freetype)
301 ("mesa" ,mesa)
302 ("sdl2" ,sdl2)))
303 (synopsis "Video game console emulator front-end")
304 (description "EmulationStation provides a graphical front-end to a large
305number of video game console emulators. It features an interface that is
306usable with any game controller that has at least 4 buttons, theming support,
307and a game metadata scraper.")
308 (home-page "http://www.emulationstation.org")
309 (license license:expat))))
310
311(define-public higan
312 (package
313 (name "higan")
314 (version "106")
315 (source
316 (origin
317 (method url-fetch)
318 (uri (string-append
319 "https://gitlab.com/higan/higan/repository/archive.tar.gz?ref=v"
320 version))
321 (file-name (string-append name "-" version ".tar.gz"))
322 (sha256
323 (base32 "0y42pra0dxzlbkyzcp3r8a39pji2bj3p9fl40425f60af2igr4rw"))
324 (patches (search-patches "higan-remove-march-native-flag.patch"))))
325 (build-system gnu-build-system)
326 (native-inputs
327 `(("pkg-config" ,pkg-config)))
328 (inputs
329 `(("alsa-lib" ,alsa-lib)
330 ("ao" ,ao)
331 ("eudev" ,eudev)
332 ("gtk+" ,gtk+-2)
333 ("gtksourceview-2" ,gtksourceview-2)
334 ("libxv" ,libxv)
335 ("mesa" ,mesa)
336 ("openal" ,openal)
337 ("pulseaudio" ,pulseaudio)
338 ("sdl" ,sdl)))
339 (arguments
340 '(#:phases
341 (let ((build-phase (assoc-ref %standard-phases 'build))
342 (install-phase (assoc-ref %standard-phases 'install)))
343 (modify-phases %standard-phases
344 ;; The higan build system has no configure phase.
345 (delete 'configure)
346 (add-before 'build 'chdir-to-higan
347 (lambda _
348 (chdir "higan")))
349 (add-before 'install 'create-/share/applications
350 (lambda* (#:key outputs #:allow-other-keys)
351 (let ((out (assoc-ref outputs "out")))
352 ;; It seems the author forgot to do this in the Makefile.
353 (mkdir-p (string-append out "/share/applications")))))
354 (add-after 'install 'chdir-to-icarus
355 (lambda _
356 (chdir "../icarus")))
357 (add-after 'chdir-to-icarus 'build-icarus build-phase)
358 (add-after 'build-icarus 'install-icarus install-phase)
359 (add-after 'install-icarus 'wrap-higan-executable
360 (lambda* (#:key inputs outputs #:allow-other-keys)
361 (let* ((out (assoc-ref outputs "out"))
362 (bin (string-append out "/bin"))
363 (higan (string-append bin "/higan"))
364 (higan-original (string-append higan "-original"))
365 (bash (string-append (assoc-ref inputs "bash")
366 "/bin/bash"))
367 (coreutils (assoc-ref inputs "coreutils"))
368 (mkdir (string-append coreutils "/bin/mkdir"))
369 (cp (string-append coreutils "/bin/cp"))
370 (cp-r (string-append cp " -r --no-preserve=mode")))
371 ;; First, have the executable make sure ~/.local/share/higan
372 ;; contains up to date files. Higan insists on looking there
373 ;; for these data files.
374 (rename-file higan higan-original)
375 (with-output-to-file higan
376 (lambda ()
377 (display
378 (string-append
379 "#!" bash "\n"
380 ;; higan doesn't respect $XDG_DATA_HOME
381 mkdir " -p ~/.local/share\n"
382 cp-r " " out "/share/higan ~/.local/share\n"
383 "exec " higan-original))))
384 (chmod higan #o555)
385 ;; Second, make sure higan will find icarus in PATH.
386 (wrap-program higan
387 `("PATH" ":" prefix (,bin))))))))
388 #:make-flags
389 (list "compiler=g++"
390 (string-append "prefix=" (assoc-ref %outputs "out")))
391 ;; There is no test suite.
392 #:tests? #f))
393 (home-page "http://byuu.org/emulation/higan/")
394 (synopsis "Nintendo multi-system emulator")
395 (description
396 "higan (formerly bsnes) is an emulator for multiple Nintendo video game
397consoles, including the Nintendo Entertainment System (NES/Famicom), Super
398Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy
399Color (GBC), and Game Boy Advance (GBA). It also supports the subsystems
400Super Game Boy, BS-X Satellaview, and Sufami Turbo.")
401 ;; As noted in these files among more:
402 ;; - icarus/icarus.cpp
403 ;; - higan/emulator/emulator.hpp
404 (license license:gpl3)))
405
406(define-public mgba
407 (package
408 (name "mgba")
fc121137 409 (version "0.6.3")
9af704c5
RH
410 (source (origin
411 (method url-fetch)
412 (uri (string-append "https://github.com/mgba-emu/mgba/archive/"
413 version ".tar.gz"))
414 (file-name (string-append name "-" version ".tar.gz"))
415 (sha256
416 (base32
fc121137 417 "16hgs6r5iym3lp2cjcnv9955333976yc5sgy2kkxlsi005n91j1m"))
9af704c5
RH
418 (modules '((guix build utils)))
419 (snippet
420 ;; Make sure we don't use the bundled software.
421 '(for-each
422 (lambda (subdir)
423 (let ((lib-subdir (string-append "src/third-party/" subdir)))
424 (delete-file-recursively lib-subdir)))
425 '("libpng" "lzma" "sqlite3" "zlib")))))
426 (build-system cmake-build-system)
427 (arguments
428 `(#:tests? #f ;no "test" target
429 #:configure-flags
430 (list "-DUSE_LZMA=OFF" ;do not use bundled LZMA
431 "-DUSE_LIBZIP=OFF" ;use "zlib" instead
432 (string-append "-DCMAKE_INSTALL_LIBDIR="
433 (assoc-ref %outputs "out") "/lib"))))
434 (native-inputs `(("pkg-config" ,pkg-config)))
435 (inputs `(("ffmpeg" ,ffmpeg)
436 ("imagemagick" ,imagemagick)
437 ("libedit" ,libedit)
438 ("libepoxy" ,libepoxy)
439 ("libpng" ,libpng)
440 ("mesa" ,mesa)
441 ("minizip" ,minizip)
442 ("ncurses" ,ncurses)
443 ("qtbase" ,qtbase)
444 ("qtmultimedia" ,qtmultimedia)
445 ("qttools" ,qttools)
446 ("sdl2" ,sdl2)
447 ("sqlite" ,sqlite)
448 ("zlib" ,zlib)))
449 (home-page "https://mgba.io")
450 (synopsis "Game Boy Advance emulator")
451 (description
452 "mGBA is an emulator for running Game Boy Advance games. It aims to be
453faster and more accurate than many existing Game Boy Advance emulators, as
454well as adding features that other emulators lack. It also supports Game Boy
455and Game Boy Color games.")
456 ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+ and "inih.c" is
457 ;; BSD-3.
458 (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3))))
459
460(define-public mupen64plus-core
461 (package
462 (name "mupen64plus-core")
463 (version "2.5")
464 (source
465 (origin
466 (method url-fetch)
467 (uri (string-append
468 "https://github.com/mupen64plus/mupen64plus-core/archive/"
469 version ".tar.gz"))
470 (file-name (string-append name "-" version ".tar.gz"))
471 (sha256
472 (base32 "0dg2hksm5qni2hcha93k7n4fqr92888p946f7phb0ndschzfh9kk"))))
473 (build-system gnu-build-system)
474 (native-inputs
475 `(("pkg-config" ,pkg-config)
476 ("which" ,which)))
477 (inputs
478 `(("freetype" ,freetype)
479 ("glu" ,glu)
480 ("libpng" ,libpng)
481 ("mesa" ,mesa)
482 ("sdl2" ,sdl2)
483 ("zlib" ,zlib)))
484 (arguments
485 '(#:phases
486 (modify-phases %standard-phases
487 ;; The mupen64plus build system has no configure phase.
488 (delete 'configure)
489 ;; Makefile is in a subdirectory.
490 (add-before
491 'build 'cd-to-project-dir
492 (lambda _
493 (chdir "projects/unix"))))
494 #:make-flags (let ((out (assoc-ref %outputs "out")))
495 (list "all" (string-append "PREFIX=" out)))
496 ;; There are no tests.
497 #:tests? #f))
498 ;; As per the Makefile (in projects/unix/Makefile):
499 (supported-systems '("i686-linux" "x86_64-linux"))
500 (home-page "http://www.mupen64plus.org/")
501 (synopsis "Nintendo 64 emulator core library")
502 (description
503 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
504which is capable of accurately playing many games. This package contains the
505core library.")
506 (license license:gpl2+)))
507
508(define-public mupen64plus-audio-sdl
509 (package
510 (name "mupen64plus-audio-sdl")
511 (version "2.5")
512 (source
513 (origin
514 (method url-fetch)
515 (uri (string-append
516 "https://github.com/mupen64plus/mupen64plus-audio-sdl/archive/"
517 version ".tar.gz"))
518 (file-name (string-append name "-" version ".tar.gz"))
519 (sha256
520 (base32 "0ss6w92n2rpfnazhg9lbq0nvs3fqx93nliz3k3wjxdlx4dpi7h3a"))))
521 (build-system gnu-build-system)
522 (native-inputs
523 `(("pkg-config" ,pkg-config)
524 ("which" ,which)))
525 (inputs
526 `(("mupen64plus-core" ,mupen64plus-core)
527 ("sdl2" ,sdl2)))
528 (arguments
529 '(#:phases
530 (modify-phases %standard-phases
531 ;; The mupen64plus build system has no configure phase.
532 (delete 'configure)
533 ;; Makefile is in a subdirectory.
534 (add-before
535 'build 'cd-to-project-dir
536 (lambda _
537 (chdir "projects/unix"))))
538 #:make-flags
539 (let ((out (assoc-ref %outputs "out"))
540 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
541 (list "all"
542 (string-append "PREFIX=" out)
543 (string-append "APIDIR=" m64p "/include/mupen64plus")))
544 ;; There are no tests.
545 #:tests? #f))
546 (home-page "http://www.mupen64plus.org/")
547 (synopsis "Mupen64Plus SDL input plugin")
548 (description
549 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
550which is capable of accurately playing many games. This package contains the
551SDL audio plugin.")
552 (license license:gpl2+)))
553
554(define-public mupen64plus-input-sdl
555 (package
556 (name "mupen64plus-input-sdl")
557 (version "2.5")
558 (source
559 (origin
560 (method url-fetch)
561 (uri (string-append
562 "https://github.com/mupen64plus/mupen64plus-input-sdl/archive/"
563 version ".tar.gz"))
564 (file-name (string-append name "-" version ".tar.gz"))
565 (sha256
566 (base32 "11sj5dbalp2nrlmki34vy7wy28vc175pnnkdk65p8599hnyq37ri"))))
567 (build-system gnu-build-system)
568 (native-inputs
569 `(("which" ,which)))
570 (inputs
571 `(("mupen64plus-core" ,mupen64plus-core)
572 ("sdl2" ,sdl2)))
573 (arguments
574 '(#:phases
575 (modify-phases %standard-phases
576 ;; The mupen64plus build system has no configure phase.
577 (delete 'configure)
578 ;; Makefile is in a subdirectory.
579 (add-before
580 'build 'cd-to-project-dir
581 (lambda _
582 (chdir "projects/unix"))))
583 #:make-flags
584 (let ((out (assoc-ref %outputs "out"))
585 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
586 (list "all"
587 (string-append "PREFIX=" out)
588 (string-append "APIDIR=" m64p "/include/mupen64plus")))
589 ;; There are no tests.
590 #:tests? #f))
591 (home-page "http://www.mupen64plus.org/")
592 (synopsis "Mupen64Plus SDL input plugin")
593 (description
594 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
595which is capable of accurately playing many games. This package contains the
596SDL input plugin.")
597 (license license:gpl2+)))
598
599(define-public mupen64plus-rsp-hle
600 (package
601 (name "mupen64plus-rsp-hle")
602 (version "2.5")
603 (source
604 (origin
605 (method url-fetch)
606 (uri (string-append
607 "https://github.com/mupen64plus/mupen64plus-rsp-hle/archive/"
608 version ".tar.gz"))
609 (file-name (string-append name "-" version ".tar.gz"))
610 (sha256
611 (base32 "15h7mgz6xd2zjzm6l3f96sbs8kwr3xvbwzgikhnka79m6c69hsxv"))))
612 (build-system gnu-build-system)
613 (inputs
614 `(("mupen64plus-core" ,mupen64plus-core)))
615 (arguments
616 '(#:phases
617 (modify-phases %standard-phases
618 ;; The mupen64plus build system has no configure phase.
619 (delete 'configure)
620 ;; Makefile is in a subdirectory.
621 (add-before
622 'build 'cd-to-project-dir
623 (lambda _
624 (chdir "projects/unix"))))
625 #:make-flags
626 (let ((out (assoc-ref %outputs "out"))
627 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
628 (list "all"
629 (string-append "PREFIX=" out)
630 (string-append "APIDIR=" m64p "/include/mupen64plus")))
631 ;; There are no tests.
632 #:tests? #f))
633 (home-page "http://www.mupen64plus.org/")
634 (synopsis "Mupen64Plus SDL input plugin")
635 (description
636 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
637which is capable of accurately playing many games. This package contains the
638high-level emulation (HLE) RSP processor plugin.")
639 (license license:gpl2+)))
640
641(define-public mupen64plus-rsp-z64
642 (package
643 (name "mupen64plus-rsp-z64")
644 (version "2.0.0")
645 (source
646 (origin
647 (method url-fetch)
648 (uri (string-append
649 "https://github.com/mupen64plus/mupen64plus-rsp-z64/archive/"
650 version ".tar.gz"))
651 (file-name (string-append name "-" version ".tar.gz"))
652 (sha256
653 (base32 "10jz1w2dhx5slhyk4m8mdqlpsd6cshchslr1fckb2ayzb1ls3ghi"))))
654 (build-system gnu-build-system)
655 (inputs
656 `(("mupen64plus-core" ,mupen64plus-core)))
657 (arguments
658 '(#:phases
659 (modify-phases %standard-phases
660 ;; The mupen64plus build system has no configure phase.
661 (delete 'configure)
662 ;; Makefile is in a subdirectory.
663 (add-before
664 'build 'cd-to-project-dir
665 (lambda _
666 (chdir "projects/unix"))))
667 #:make-flags
668 (let ((out (assoc-ref %outputs "out"))
669 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
670 (list "all"
671 (string-append "PREFIX=" out)
672 (string-append "APIDIR=" m64p "/include/mupen64plus")))
673 ;; There are no tests.
674 #:tests? #f))
675 (home-page "http://www.mupen64plus.org/")
676 (synopsis "Mupen64Plus SDL input plugin")
677 (description
678 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
679which is capable of accurately playing many games. This package contains the
680Z64 RSP processor plugin.")
681 (license license:gpl2+)))
682
683(define-public mupen64plus-video-arachnoid
684 (package
685 (name "mupen64plus-video-arachnoid")
686 (version "2.0.0")
687 (source
688 (origin
689 (method url-fetch)
690 (uri (string-append
691 "https://github.com/mupen64plus/mupen64plus-video-arachnoid/archive/"
692 version ".tar.gz"))
693 (file-name (string-append name "-" version ".tar.gz"))
694 (sha256
695 (base32 "0jjwf144rihznm4lnqbhgigxw664v3v32wy94adaa6imk8z6gslh"))))
696 (build-system gnu-build-system)
697 (native-inputs
698 `(("pkg-config" ,pkg-config)
699 ("which" ,which)))
700 (inputs
701 `(("mesa" ,mesa)
702 ("mupen64plus-core" ,mupen64plus-core)))
703 (arguments
704 '(#:phases
705 (modify-phases %standard-phases
706 ;; The mupen64plus build system has no configure phase.
707 (delete 'configure)
708 ;; Makefile is in a subdirectory.
709 (add-before
710 'build 'cd-to-project-dir
711 (lambda _
712 (chdir "projects/unix"))))
713 #:make-flags
714 (let ((out (assoc-ref %outputs "out"))
715 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
716 (list "all"
717 (string-append "PREFIX=" out)
718 (string-append "APIDIR=" m64p "/include/mupen64plus")))
719 ;; There are no tests.
720 #:tests? #f))
721 (home-page "http://www.mupen64plus.org/")
722 (synopsis "Mupen64Plus Rice Video plugin")
723 (description
724 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
725which is capable of accurately playing many games. This package contains the
726Arachnoid video plugin.")
727 (license license:gpl2+)))
728
729(define-public mupen64plus-video-glide64
730 (package
731 (name "mupen64plus-video-glide64")
732 (version "2.0.0")
733 (source
734 (origin
735 (method url-fetch)
736 (uri (string-append
737 "https://github.com/mupen64plus/mupen64plus-video-glide64/archive/"
738 version ".tar.gz"))
739 (file-name (string-append name "-" version ".tar.gz"))
740 (sha256
741 (base32 "1rm55dbf6xgsq1blbzs6swa2ajv0qkn38acbljj346abnk6s3dla"))))
742 (build-system gnu-build-system)
743 (native-inputs
744 `(("pkg-config" ,pkg-config)
745 ("which" ,which)))
746 (inputs
747 `(("mesa" ,mesa)
748 ("mupen64plus-core" ,mupen64plus-core)
749 ("sdl2" ,sdl2)))
750 (arguments
751 '(#:phases
752 (modify-phases %standard-phases
753 ;; The mupen64plus build system has no configure phase.
754 (delete 'configure)
755 ;; Makefile is in a subdirectory.
756 (add-before
757 'build 'cd-to-project-dir
758 (lambda _
759 (chdir "projects/unix")))
760 ;; XXX Should be unnecessary with the next release.
761 (add-before
762 'build 'use-sdl2
763 (lambda _
764 (substitute* "Makefile"
765 (("SDL_CONFIG = (.*)sdl-config" all prefix)
766 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
767 #:make-flags
768 (let ((out (assoc-ref %outputs "out"))
769 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
770 (list "all"
771 (string-append "PREFIX=" out)
772 (string-append "APIDIR=" m64p "/include/mupen64plus")))
773 ;; There are no tests.
774 #:tests? #f))
775 (home-page "http://www.mupen64plus.org/")
776 (synopsis "Mupen64Plus Rice Video plugin")
777 (description
778 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
779which is capable of accurately playing many games. This package contains the
780Glide64 video plugin.")
781 (license license:gpl2+)))
782
783(define-public mupen64plus-video-glide64mk2
784 (package
785 (name "mupen64plus-video-glide64mk2")
786 (version "2.5")
787 (source
788 (origin
789 (method url-fetch)
790 (uri (string-append
791 "https://github.com/mupen64plus/mupen64plus-video-glide64mk2/archive/"
792 version ".tar.gz"))
793 (file-name (string-append name "-" version ".tar.gz"))
794 (sha256
795 (base32 "1ihl4q293d6svba26b4mhapjcdg12p90gibz79b4mx423jlcxxj9"))))
796 (build-system gnu-build-system)
797 (native-inputs
798 `(("pkg-config" ,pkg-config)
799 ("which" ,which)))
800 (inputs
801 `(("boost" ,boost)
802 ("libpng" ,libpng)
803 ("mesa" ,mesa)
804 ("mupen64plus-core" ,mupen64plus-core)
805 ("sdl2" ,sdl2)
806 ("zlib" ,zlib)))
807 (arguments
808 '(#:phases
809 (modify-phases %standard-phases
810 ;; The mupen64plus build system has no configure phase.
811 (delete 'configure)
812 ;; Makefile is in a subdirectory.
813 (add-before
814 'build 'cd-to-project-dir
815 (lambda _
816 (chdir "projects/unix"))))
817 #:make-flags
818 (let ((out (assoc-ref %outputs "out"))
819 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
820 (list "all"
821 (string-append "PREFIX=" out)
822 (string-append "APIDIR=" m64p "/include/mupen64plus")))
823 ;; There are no tests.
824 #:tests? #f))
825 (home-page "http://www.mupen64plus.org/")
826 (synopsis "Mupen64Plus Rice Video plugin")
827 (description
828 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
829which is capable of accurately playing many games. This package contains the
830Glide64MK2 video plugin.")
831 (license license:gpl2+)))
832
833(define-public mupen64plus-video-rice
834 (package
835 (name "mupen64plus-video-rice")
836 (version "2.5")
837 (source
838 (origin
839 (method url-fetch)
840 (uri (string-append
841 "https://github.com/mupen64plus/mupen64plus-video-rice/archive/"
842 version ".tar.gz"))
843 (file-name (string-append name "-" version ".tar.gz"))
844 (sha256
845 (base32 "0rd2scjmh285w61aj3mgx71whg5rqrjbry3cdgicczrnyvf8wdvk"))))
846 (build-system gnu-build-system)
847 (native-inputs
848 `(("pkg-config" ,pkg-config)
849 ("which" ,which)))
850 (inputs
851 `(("libpng" ,libpng)
852 ("mesa" ,mesa)
853 ("mupen64plus-core" ,mupen64plus-core)
854 ("sdl2" ,sdl2)))
855 (arguments
856 '(#:phases
857 (modify-phases %standard-phases
858 ;; The mupen64plus build system has no configure phase.
859 (delete 'configure)
860 ;; Makefile is in a subdirectory.
861 (add-before
862 'build 'cd-to-project-dir
863 (lambda _
864 (chdir "projects/unix"))))
865 #:make-flags
866 (let ((out (assoc-ref %outputs "out"))
867 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
868 (list "all"
869 (string-append "PREFIX=" out)
870 (string-append "APIDIR=" m64p "/include/mupen64plus")))
871 ;; There are no tests.
872 #:tests? #f))
873 (home-page "http://www.mupen64plus.org/")
874 (synopsis "Mupen64Plus Rice Video plugin")
875 (description
876 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
877which is capable of accurately playing many games. This package contains the
878Rice Video plugin.")
879 (license license:gpl2+)))
880
881(define-public mupen64plus-video-z64
882 (package
883 (name "mupen64plus-video-z64")
884 (version "2.0.0")
885 (source
886 (origin
887 (method url-fetch)
888 (uri (string-append
889 "https://github.com/mupen64plus/mupen64plus-video-z64/archive/"
890 version ".tar.gz"))
891 (file-name (string-append name "-" version ".tar.gz"))
892 (sha256
fdb61400
MR
893 (base32 "1x7wsjs5gx2iwx20p4cjcbf696zsjlh31qxmghwv0ifrq8x58s1b"))
894 (patches (search-patches "mupen64plus-video-z64-glew-correct-path.patch"))))
9af704c5
RH
895 (build-system gnu-build-system)
896 (native-inputs
897 `(("pkg-config" ,pkg-config)
898 ("which" ,which)))
899 (inputs
900 `(("glew" ,glew)
901 ("mupen64plus-core" ,mupen64plus-core)
902 ("sdl2" ,sdl2)))
903 (arguments
904 '(#:phases
905 (modify-phases %standard-phases
906 ;; The mupen64plus build system has no configure phase.
907 (delete 'configure)
908 ;; Makefile is in a subdirectory.
909 (add-before
910 'build 'cd-to-project-dir
911 (lambda _
912 (chdir "projects/unix")))
913 ;; XXX Should be unnecessary with the next release.
914 (add-before
915 'build 'use-sdl2
916 (lambda _
917 (substitute* "Makefile"
918 (("SDL_CONFIG = (.*)sdl-config" all prefix)
919 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
920 #:make-flags
921 (let ((out (assoc-ref %outputs "out"))
922 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
923 (list "all"
924 (string-append "PREFIX=" out)
925 (string-append "APIDIR=" m64p "/include/mupen64plus")))
926 ;; There are no tests.
927 #:tests? #f))
928 (home-page "http://www.mupen64plus.org/")
929 (synopsis "Mupen64Plus Z64 video plugin")
930 (description
931 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
932which is capable of accurately playing many games. This package contains the
933Z64 video plugin.")
934 (license license:gpl2+)))
935
936(define-public mupen64plus-ui-console
937 (package
938 (name "mupen64plus-ui-console")
939 (version "2.5")
940 (source
941 (origin
942 (method url-fetch)
943 (uri (string-append
944 "https://github.com/mupen64plus/mupen64plus-ui-console/archive/"
945 version ".tar.gz"))
946 (file-name (string-append name "-" version ".tar.gz"))
947 (sha256
948 (base32 "04qkpd8ic7xsgnqz7spl00wxdygf79m7d1k8rabbygjk5lg6p8z2"))
949 (patches (search-patches "mupen64plus-ui-console-notice.patch"))))
950 (build-system gnu-build-system)
951 (native-inputs
952 `(("pkg-config" ,pkg-config)
953 ("which" ,which)))
954 (inputs
955 `(("sdl2" ,sdl2)))
956 ;; Mupen64Plus supports a single data directory and a single plugin
957 ;; directory in its configuration, yet we need data and plugin files from
958 ;; a variety of packages. The best way to deal with this is to install
959 ;; all packages from which data and plugin files are needed into one's
960 ;; profile, and point the configuration there. Hence, propagate the most
961 ;; important packages here to save the user from the bother. The patch
962 ;; mupen64plus-ui-console-notice also gives users instructions on what
963 ;; they need to do in order to point the configuration to their profile.
964 (propagated-inputs
965 `(("mupen64plus-core" ,mupen64plus-core)
966 ("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl)
967 ("mupen64plus-input-sdl" ,mupen64plus-input-sdl)
968 ("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle)
969 ("mupen64plus-video-glide64" ,mupen64plus-video-glide64)
970 ("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2)
971 ("mupen64plus-video-rice" ,mupen64plus-video-rice)))
972 (arguments
973 '(#:phases
974 (modify-phases %standard-phases
975 ;; The mupen64plus build system has no configure phase.
976 (delete 'configure)
977 ;; Makefile is in a subdirectory.
978 (add-before
979 'build 'cd-to-project-dir
980 (lambda _
981 (chdir "projects/unix"))))
982 #:make-flags
983 (let ((out (assoc-ref %outputs "out"))
984 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
985 (list "all"
986 (string-append "PREFIX=" out)
987 (string-append "APIDIR=" m64p "/include/mupen64plus")
988 ;; Trailing slash matters here.
989 (string-append "COREDIR=" m64p "/lib/")))
990 ;; There are no tests.
991 #:tests? #f))
992 (home-page "http://www.mupen64plus.org/")
993 (synopsis "Mupen64Plus SDL input plugin")
994 (description
995 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
996which is capable of accurately playing many games. This package contains the
997command line user interface. Installing this package is the easiest way
998towards a working Mupen64Plus for casual users.")
999 (license license:gpl2+)))
1000
1001(define-public nestopia-ue
1002 (package
1003 (name "nestopia-ue")
9d39c300 1004 (version "1.48")
9af704c5
RH
1005 (source (origin
1006 (method url-fetch)
1007 (uri (string-append
1008 "https://github.com/rdanbrook/nestopia/archive/"
1009 version ".tar.gz"))
1010 (file-name (string-append name "-" version ".tar.gz"))
1011 (sha256
1012 (base32
9d39c300 1013 "184y05z4k4a4m4022niy625kan0rklh8gcxyynxli1fss2sjjrpv"))
9af704c5
RH
1014 (modules '((guix build utils)))
1015 (snippet
1016 '(begin
1017 ;; We don't need libretro for the GNU/Linux build.
9d39c300
KK
1018 (delete-file-recursively "libretro")))))
1019 (build-system cmake-build-system)
9af704c5
RH
1020 (native-inputs
1021 `(("pkg-config" ,pkg-config)))
1022 (inputs
1023 `(("ao" ,ao)
9af704c5
RH
1024 ("gtk+" ,gtk+)
1025 ("libarchive" ,libarchive)
9d39c300 1026 ("libepoxy" ,libepoxy)
9af704c5
RH
1027 ("sdl2" ,sdl2)
1028 ("zlib" ,zlib)))
1029 (arguments
1030 '(#:phases
1031 (modify-phases %standard-phases
9d39c300
KK
1032 ;; This fixes the file chooser crash that happens with GTK 3.
1033 (add-after 'install 'wrap-program
1034 (lambda* (#:key inputs outputs #:allow-other-keys)
1035 (let* ((out (assoc-ref outputs "out"))
1036 (nestopia (string-append out "/bin/nestopia"))
1037 (gtk (assoc-ref inputs "gtk+"))
1038 (gtk-share (string-append gtk "/share")))
1039 (wrap-program nestopia
1040 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))))))
9af704c5
RH
1041 ;; There are no tests.
1042 #:tests? #f))
1043 (home-page "http://0ldsk00l.ca/nestopia/")
1044 (synopsis "Nintendo Entertainment System (NES/Famicom) emulator")
1045 (description
1046 "Nestopia UE (Undead Edition) is a fork of the Nintendo Entertainment
1047System (NES/Famicom) emulator Nestopia, with enhancements from members of the
1048emulation community. It provides highly accurate emulation.")
1049 (license license:gpl2+)))
1050
1051(define-public retroarch
1052 (package
1053 (name "retroarch")
76b7d8fd 1054 (version "1.7.3")
9af704c5
RH
1055 (source
1056 (origin
1057 (method url-fetch)
1058 (uri (string-append "https://github.com/libretro/RetroArch/archive/v"
1059 version ".tar.gz"))
1060 (file-name (string-append name "-" version ".tar.gz"))
1061 (sha256
76b7d8fd 1062 (base32 "1si78dbwbsq4i0r42q94nmlpaxdyqch113nxavdprf4vc1224356"))))
9af704c5
RH
1063 (build-system gnu-build-system)
1064 (arguments
1065 '(#:tests? #f ; no tests
1066 #:phases
1067 (modify-phases %standard-phases
1068 (replace 'configure
1069 (lambda* (#:key inputs outputs #:allow-other-keys)
1070 (let* ((out (assoc-ref outputs "out"))
1071 (etc (string-append out "/etc"))
e6fcf903 1072 (vulkan (assoc-ref inputs "vulkan-loader")))
9af704c5
RH
1073 ;; Hard-code the path to libvulkan.so.
1074 (substitute* "gfx/common/vulkan_common.c"
1075 (("libvulkan.so") (string-append vulkan "/lib/libvulkan.so")))
1076 (substitute* "qb/qb.libs.sh"
1077 (("/bin/true") (which "true")))
1078 ;; The configure script does not yet accept the extra arguments
1079 ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase.
1080 (zero? (system*
1081 "./configure"
1082 (string-append "--prefix=" out)
1083 (string-append "--global-config-dir=" etc)))))))))
1084 (inputs
1085 `(("alsa-lib" ,alsa-lib)
1086 ("ffmpeg" ,ffmpeg)
1087 ("freetype" ,freetype)
1088 ("libxinerama" ,libxinerama)
1089 ("libxkbcommon" ,libxkbcommon)
1090 ("libxml2" ,libxml2)
1091 ("libxv" ,libxv)
1092 ("mesa" ,mesa)
1093 ("openal" ,openal)
1094 ("pulseaudio" ,pulseaudio)
1095 ("python" ,python)
76b7d8fd 1096 ("qtbase" ,qtbase)
9af704c5
RH
1097 ("sdl" ,sdl2)
1098 ("udev" ,eudev)
e6fcf903 1099 ("vulkan-loader" ,vulkan-loader)
c695fb76 1100 ("wayland" ,wayland)
9af704c5
RH
1101 ("zlib" ,zlib)))
1102 (native-inputs
1103 `(("pkg-config" ,pkg-config)
1104 ("which" ,which)))
1105 (home-page "https://www.libretro.com/")
1106 (synopsis "Reference frontend for the libretro API")
1107 (description
1108 "Libretro is a simple but powerful development interface that allows for
1109the easy creation of emulators, games and multimedia applications that can plug
1110straight into any libretro-compatible frontend. RetroArch is the official
1111reference frontend for the libretro API, currently used by most as a modular
1112multi-system game/emulator system.")
1113 (license license:gpl3+)))
4c40ed9d
NG
1114
1115(define-public scummvm
1116 (package
1117 (name "scummvm")
1118 (version "2.0.0")
1119 (source
1120 (origin
1121 (method url-fetch)
1122 (uri (string-append "http://www.scummvm.org/frs/scummvm/" version
1123 "/scummvm-" version ".tar.xz"))
1124 (sha256
1125 (base32
1126 "0q6aiw97wsrf8cjw9vjilzhqqsr2rw2lll99s8i5i9svan6l314p"))))
1127 (build-system gnu-build-system)
1128 (arguments
1129 `(#:tests? #f ;require "git"
1130 #:configure-flags (list "--enable-release") ;for optimizations
1131 #:phases
1132 (modify-phases %standard-phases
1133 (replace 'configure
1134 ;; configure does not work followed by both "SHELL=..." and
1135 ;; "CONFIG_SHELL=..."; set environment variables instead
1136 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1137 (let* ((out (assoc-ref outputs "out"))
1138 (bash (which "bash"))
1139 (flags `(,(string-append "--prefix=" out)
1140 ,@configure-flags)))
1141 (setenv "SHELL" bash)
1142 (setenv "CONFIG_SHELL" bash)
1143 (apply invoke "./configure" flags)))))))
1144 (native-inputs
1145 `(("pkg-config" ,pkg-config)))
1146 (inputs
1147 `(("alsa-lib" ,alsa-lib)
1148 ("faad2" ,faad2)
1149 ("fluidsynth" ,fluidsynth)
1150 ("freetype" ,freetype)
1151 ("libflac" ,flac)
1152 ("libjpeg-turbo" ,libjpeg-turbo)
1153 ("libmad" ,libmad)
1154 ("libmpeg2" ,libmpeg2)
1155 ("libogg" ,libogg)
1156 ("libpng" ,libpng)
1157 ("libtheora" ,libtheora)
1158 ("libvorbis" ,libvorbis)
1159 ("nasm" ,nasm)
1160 ("sdl2" ,sdl2)
1161 ("zlib" ,zlib)))
1162 (home-page "https://www.scummvm.org/")
1163 (synopsis "Engine for several graphical adventure games")
1164 (description "ScummVM is a program which allows you to run certain
1165classic graphical point-and-click adventure games, provided you
1166already have their data files. The clever part about this: ScummVM
1167just replaces the executables shipped with the games, allowing you to
1168play them on systems for which they were never designed!")
1169 (license license:gpl2+)))