Commit | Line | Data |
---|---|---|
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> |
8f4d15f1 | 9 | ;;; Copyright © 2017, 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
9af704c5 | 10 | ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> |
478040d4 | 11 | ;;; Copyright © 2017, 2018, 2019 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) | |
e8ffa382 | 44 | #:use-module (gnu packages elf) |
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) | |
c8b2fd28 NG |
59 | #:use-module (gnu packages lua) |
60 | #:use-module (gnu packages maths) | |
4c40ed9d | 61 | #:use-module (gnu packages mp3) |
c8b2fd28 | 62 | #:use-module (gnu packages music) |
9af704c5 | 63 | #:use-module (gnu packages ncurses) |
c8b2fd28 | 64 | #:use-module (gnu packages networking) |
e5f9ec8b RH |
65 | #:use-module (gnu packages pkg-config) |
66 | #:use-module (gnu packages pulseaudio) | |
9af704c5 | 67 | #:use-module (gnu packages python) |
e5f9ec8b RH |
68 | #:use-module (gnu packages qt) |
69 | #:use-module (gnu packages sdl) | |
9d0c291e | 70 | #:use-module (gnu packages sphinx) |
cd0322a3 | 71 | #:use-module (gnu packages sqlite) |
c8b2fd28 NG |
72 | #:use-module (gnu packages texinfo) |
73 | #:use-module (gnu packages textutils) | |
e5f9ec8b RH |
74 | #:use-module (gnu packages tls) |
75 | #:use-module (gnu packages upnp) | |
76 | #:use-module (gnu packages video) | |
9af704c5 | 77 | #:use-module (gnu packages vulkan) |
e5f9ec8b | 78 | #:use-module (gnu packages wxwidgets) |
9af704c5 | 79 | #:use-module (gnu packages xdisorg) |
e5f9ec8b | 80 | #:use-module (gnu packages xiph) |
9af704c5 | 81 | #:use-module (gnu packages xml) |
e5f9ec8b | 82 | #:use-module (gnu packages xorg) |
c8b2fd28 | 83 | #:use-module (gnu packages web) |
9af704c5 RH |
84 | #:use-module (guix build-system cmake) |
85 | #:use-module (guix build-system gnu)) | |
86 | ||
87 | (define-public desmume | |
88 | (package | |
89 | (name "desmume") | |
90 | (version "0.9.11") | |
91 | (source | |
92 | (origin | |
93 | (method url-fetch) | |
94 | (uri (string-append | |
95 | "mirror://sourceforge/desmume/desmume/" | |
96 | version "/desmume-" version ".tar.gz")) | |
97 | (sha256 | |
98 | (base32 | |
99 | "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs")))) | |
100 | (build-system gnu-build-system) | |
101 | (arguments | |
102 | ;; Enable support for WiFi and microphone. | |
103 | `(#:configure-flags '("--enable-wifi" | |
104 | "--enable-openal"))) | |
105 | (native-inputs | |
106 | `(("pkg-config" ,pkg-config) | |
107 | ("intltool" ,intltool))) | |
108 | (inputs | |
109 | `(("zlib" ,zlib) | |
110 | ("sdl" ,sdl) | |
111 | ("glib" ,glib) | |
112 | ("gtk+" ,gtk+-2) | |
113 | ("glu" ,glu))) | |
114 | (home-page "http://desmume.org/") | |
115 | (synopsis "Nintendo DS emulator") | |
116 | (description | |
117 | "DeSmuME is an emulator for the Nintendo DS handheld gaming console.") | |
118 | (license license:gpl2))) | |
e5f9ec8b RH |
119 | |
120 | ;; Building from recent Git because the official 5.0 release no longer builds. | |
121 | (define-public dolphin-emu | |
1f51f0d9 RH |
122 | (let ((commit "2c57e709d0f9e4010a4415de4192de887e37f187") |
123 | (revision "5")) | |
e5f9ec8b RH |
124 | (package |
125 | (name "dolphin-emu") | |
126 | (version (git-version "5.0" revision commit)) | |
127 | (source | |
128 | (origin | |
129 | (method git-fetch) | |
130 | (uri (git-reference | |
131 | (url "https://github.com/dolphin-emu/dolphin.git") | |
132 | (commit commit))) | |
133 | (file-name (git-file-name name version)) | |
85280804 EF |
134 | (modules '((guix build utils))) |
135 | (snippet | |
136 | '(begin | |
137 | ;; Remove external stuff we don't need. | |
138 | (for-each (lambda (dir) | |
139 | (delete-file-recursively | |
140 | (string-append "Externals/" dir))) | |
fab8d41c | 141 | '("LZO" "OpenAL" "Qt" "SFML" "curl" "ffmpeg" |
85280804 | 142 | "gettext" "hidapi" "libpng" "libusb" "mbedtls" |
fab8d41c | 143 | "miniupnpc" "zlib")) |
85280804 EF |
144 | ;; Clean up source. |
145 | (for-each delete-file (find-files "." ".*\\.(bin|dsy|exe|jar|rar)$")) | |
146 | #t)) | |
e5f9ec8b RH |
147 | (sha256 |
148 | (base32 | |
1f51f0d9 | 149 | "0aszfdfvs7yg4bmrd3qxwsiz7hx3mrj29f4aw86bz7h9j7hkh57f")))) |
e5f9ec8b RH |
150 | (build-system cmake-build-system) |
151 | (arguments | |
152 | '(#:tests? #f | |
e5f9ec8b RH |
153 | #:phases |
154 | (modify-phases %standard-phases | |
cbf58afa RH |
155 | (add-before 'configure 'fixgcc7 |
156 | (lambda _ | |
157 | (unsetenv "C_INCLUDE_PATH") | |
124e9d6e RH |
158 | (unsetenv "CPLUS_INCLUDE_PATH") |
159 | #t)) | |
6bebad77 | 160 | (add-before 'configure 'generate-fonts&hardcore-libvulkan-path |
e5f9ec8b RH |
161 | (lambda* (#:key inputs outputs #:allow-other-keys) |
162 | (let ((fontfile | |
163 | (string-append (assoc-ref inputs "font-wqy-microhei") | |
6bebad77 RH |
164 | "/share/fonts/truetype/wqy-microhei.ttc")) |
165 | (libvulkan | |
e6fcf903 | 166 | (string-append (assoc-ref inputs "vulkan-loader") |
6bebad77 | 167 | "/lib/libvulkan.so"))) |
e5f9ec8b RH |
168 | (chdir "docs") |
169 | (invoke "bash" "-c" "g++ -O2 -std=c++11 $(freetype-config \ | |
170 | --cflags --libs) gc-font-tool.cpp -o gc-font-tool") | |
171 | (invoke "./gc-font-tool" "a" fontfile "font_western.bin") | |
172 | (invoke "./gc-font-tool" "s" fontfile "font_japanese.bin") | |
173 | (copy-file "font_japanese.bin" "../Data/Sys/GC/font_japanese.bin") | |
174 | (copy-file "font_western.bin" "../Data/Sys/GC/font_western.bin") | |
175 | (chdir "..") | |
6bebad77 RH |
176 | (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp" |
177 | (("libvulkan.so") libvulkan)) | |
e5f9ec8b RH |
178 | #t)))) |
179 | ||
fab8d41c RH |
180 | ;; The FindGTK2 cmake script only checks hardcoded directories for |
181 | ;; glib/gtk headers. | |
182 | ||
e5f9ec8b | 183 | #:configure-flags |
fab8d41c | 184 | (list (string-append "-DX11_INCLUDE_DIR=" |
e5f9ec8b RH |
185 | (assoc-ref %build-inputs "libx11") |
186 | "/include") | |
187 | (string-append "-DX11_LIBRARIES=" | |
188 | (assoc-ref %build-inputs "libx11") | |
189 | "/lib/libX11.so") | |
190 | "-DX11_FOUND=1"))) | |
e5f9ec8b RH |
191 | (native-inputs |
192 | `(("pkg-config" ,pkg-config) | |
cbf58afa | 193 | ("gcc" ,gcc-7) ; Building with gcc@5 doesn't work anymore. |
e5f9ec8b RH |
194 | ("gettext" ,gnu-gettext))) |
195 | (inputs | |
196 | `(("alsa-lib" ,alsa-lib) | |
197 | ("ao" ,ao) | |
198 | ("bluez" ,bluez) | |
199 | ("curl" ,curl) | |
200 | ("eudev" ,eudev) | |
e7039f10 | 201 | ("ffmpeg" ,ffmpeg) |
e5f9ec8b RH |
202 | ("font-wqy-microhei" ,font-wqy-microhei) |
203 | ("freetype" ,freetype) | |
204 | ("glew" ,glew) | |
205 | ("glib" ,glib) | |
206 | ("glu" ,glu) | |
207 | ("gtk+" ,gtk+-2) | |
208 | ("hidapi" ,hidapi) | |
209 | ("libevdev" ,libevdev) | |
210 | ("libpng" ,libpng) | |
211 | ("libusb" ,libusb) | |
212 | ("libx11" ,libx11) | |
213 | ("libxi" ,libxi) | |
214 | ("libxrandr" ,libxrandr) | |
215 | ("lzo" ,lzo) | |
216 | ("mbedtls-apache" ,mbedtls-apache) | |
217 | ("mesa" ,mesa) | |
218 | ("miniupnpc" ,miniupnpc) | |
219 | ("openal" ,openal) | |
fab8d41c | 220 | ("pugixml" ,pugixml) |
e5f9ec8b RH |
221 | ("pulseaudio" ,pulseaudio) |
222 | ("qtbase" ,qtbase) | |
223 | ("sdl2" ,sdl2) | |
224 | ("sfml" ,sfml) | |
225 | ("soil" ,soil) | |
226 | ("soundtouch" ,soundtouch) | |
e6fcf903 | 227 | ("vulkan-loader" ,vulkan-loader) |
e5f9ec8b RH |
228 | ("zlib" ,zlib))) |
229 | (home-page "https://dolphin-emu.org/") | |
230 | (synopsis "Nintendo Wii and GameCube emulator") | |
231 | (description | |
232 | "Dolphin is an emulator for two Nintendo video game consoles: the | |
233 | GameCube and the Wii. It provides compatibility with all PC controllers, | |
234 | turbo speed, networked multiplayer, and graphical enhancements.") | |
e89bfc2d | 235 | (supported-systems '("x86_64-linux" "aarch64-linux")) |
e5f9ec8b RH |
236 | ; dolphin/Data/Sys/GC/font_*.bin: Licensed under ASL2.0. |
237 | (license (list license:gpl2+ license:asl2.0 license:fdl1.2+))))) | |
9af704c5 RH |
238 | |
239 | (define-public dosbox | |
240 | (package | |
241 | (name "dosbox") | |
478040d4 | 242 | (version "0.74-2") |
9af704c5 | 243 | (source (origin |
478040d4 RH |
244 | (method url-fetch) |
245 | (uri (string-append "https://sourceforge.net/projects/dosbox" | |
246 | "/files/dosbox/" version "/dosbox-" | |
247 | version ".tar.gz/download")) | |
248 | (file-name (string-append name "-" version ".tar.gz")) | |
9af704c5 RH |
249 | (sha256 |
250 | (base32 | |
478040d4 | 251 | "1ksp1b5szi0vy4x55rm3j1y9wq5mlslpy8llpg87rpdyjlsk0xvh")))) |
9af704c5 RH |
252 | (build-system gnu-build-system) |
253 | (arguments | |
254 | `(#:phases (modify-phases %standard-phases | |
255 | (add-after | |
256 | 'unpack 'autogen.sh | |
257 | (lambda _ | |
478040d4 | 258 | (invoke "sh" "autogen.sh")))))) |
9af704c5 RH |
259 | (native-inputs |
260 | `(("autoconf" ,autoconf) | |
261 | ("automake" ,automake))) | |
262 | (inputs | |
263 | `(("sdl" ,sdl) | |
264 | ("libpng" ,libpng) | |
265 | ("zlib" ,zlib) | |
266 | ("alsa-lib" ,alsa-lib) | |
267 | ("glu" ,glu) | |
268 | ("mesa" ,mesa))) | |
269 | (home-page "http://www.dosbox.com") | |
270 | (synopsis "X86 emulator with CGA/EGA/VGA/etc. graphics and sound") | |
271 | (description "DOSBox is a DOS-emulator that uses the SDL library. DOSBox | |
272 | also emulates CPU:286/386 realmode/protected mode, Directory | |
273 | FileSystem/XMS/EMS, Tandy/Hercules/CGA/EGA/VGA/VESA graphics, a | |
274 | SoundBlaster/Gravis Ultra Sound card for excellent sound compatibility with | |
275 | older games.") | |
276 | (license license:gpl2+))) | |
277 | ||
278 | (define-public emulation-station | |
279 | (let ((commit "646bede3d9ec0acf0ae378415edac136774a66c5")) | |
280 | (package | |
281 | (name "emulation-station") | |
282 | (version "2.0.1") | |
283 | (source (origin | |
284 | (method git-fetch) ; no tarball available | |
285 | (uri (git-reference | |
286 | (url "https://github.com/Aloshi/EmulationStation.git") | |
287 | (commit commit))) ; no version tag | |
288 | (file-name (string-append name "-" version "-checkout")) | |
289 | (sha256 | |
290 | (base32 | |
291 | "0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v")))) | |
292 | (build-system cmake-build-system) | |
293 | (arguments | |
294 | '(#:tests? #f)) ; no tests | |
295 | (inputs | |
296 | `(("alsa-lib" ,alsa-lib) | |
297 | ("boost" ,boost) | |
298 | ("curl" ,curl) | |
299 | ("eigin" ,eigen) | |
300 | ("freeimage" ,freeimage) | |
301 | ("freetype" ,freetype) | |
302 | ("mesa" ,mesa) | |
303 | ("sdl2" ,sdl2))) | |
304 | (synopsis "Video game console emulator front-end") | |
305 | (description "EmulationStation provides a graphical front-end to a large | |
306 | number of video game console emulators. It features an interface that is | |
307 | usable with any game controller that has at least 4 buttons, theming support, | |
308 | and a game metadata scraper.") | |
309 | (home-page "http://www.emulationstation.org") | |
310 | (license license:expat)))) | |
311 | ||
312 | (define-public higan | |
313 | (package | |
314 | (name "higan") | |
315 | (version "106") | |
316 | (source | |
317 | (origin | |
318 | (method url-fetch) | |
319 | (uri (string-append | |
320 | "https://gitlab.com/higan/higan/repository/archive.tar.gz?ref=v" | |
321 | version)) | |
322 | (file-name (string-append name "-" version ".tar.gz")) | |
323 | (sha256 | |
324 | (base32 "0y42pra0dxzlbkyzcp3r8a39pji2bj3p9fl40425f60af2igr4rw")) | |
325 | (patches (search-patches "higan-remove-march-native-flag.patch")))) | |
326 | (build-system gnu-build-system) | |
327 | (native-inputs | |
328 | `(("pkg-config" ,pkg-config))) | |
329 | (inputs | |
330 | `(("alsa-lib" ,alsa-lib) | |
331 | ("ao" ,ao) | |
332 | ("eudev" ,eudev) | |
333 | ("gtk+" ,gtk+-2) | |
334 | ("gtksourceview-2" ,gtksourceview-2) | |
335 | ("libxv" ,libxv) | |
336 | ("mesa" ,mesa) | |
337 | ("openal" ,openal) | |
338 | ("pulseaudio" ,pulseaudio) | |
339 | ("sdl" ,sdl))) | |
340 | (arguments | |
341 | '(#:phases | |
342 | (let ((build-phase (assoc-ref %standard-phases 'build)) | |
343 | (install-phase (assoc-ref %standard-phases 'install))) | |
344 | (modify-phases %standard-phases | |
345 | ;; The higan build system has no configure phase. | |
346 | (delete 'configure) | |
347 | (add-before 'build 'chdir-to-higan | |
348 | (lambda _ | |
349 | (chdir "higan"))) | |
350 | (add-before 'install 'create-/share/applications | |
351 | (lambda* (#:key outputs #:allow-other-keys) | |
352 | (let ((out (assoc-ref outputs "out"))) | |
353 | ;; It seems the author forgot to do this in the Makefile. | |
354 | (mkdir-p (string-append out "/share/applications"))))) | |
355 | (add-after 'install 'chdir-to-icarus | |
356 | (lambda _ | |
357 | (chdir "../icarus"))) | |
358 | (add-after 'chdir-to-icarus 'build-icarus build-phase) | |
359 | (add-after 'build-icarus 'install-icarus install-phase) | |
360 | (add-after 'install-icarus 'wrap-higan-executable | |
361 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
362 | (let* ((out (assoc-ref outputs "out")) | |
363 | (bin (string-append out "/bin")) | |
364 | (higan (string-append bin "/higan")) | |
365 | (higan-original (string-append higan "-original")) | |
366 | (bash (string-append (assoc-ref inputs "bash") | |
367 | "/bin/bash")) | |
368 | (coreutils (assoc-ref inputs "coreutils")) | |
369 | (mkdir (string-append coreutils "/bin/mkdir")) | |
370 | (cp (string-append coreutils "/bin/cp")) | |
371 | (cp-r (string-append cp " -r --no-preserve=mode"))) | |
372 | ;; First, have the executable make sure ~/.local/share/higan | |
373 | ;; contains up to date files. Higan insists on looking there | |
374 | ;; for these data files. | |
375 | (rename-file higan higan-original) | |
376 | (with-output-to-file higan | |
377 | (lambda () | |
378 | (display | |
379 | (string-append | |
380 | "#!" bash "\n" | |
381 | ;; higan doesn't respect $XDG_DATA_HOME | |
382 | mkdir " -p ~/.local/share\n" | |
383 | cp-r " " out "/share/higan ~/.local/share\n" | |
384 | "exec " higan-original)))) | |
385 | (chmod higan #o555) | |
386 | ;; Second, make sure higan will find icarus in PATH. | |
387 | (wrap-program higan | |
388 | `("PATH" ":" prefix (,bin)))))))) | |
389 | #:make-flags | |
390 | (list "compiler=g++" | |
391 | (string-append "prefix=" (assoc-ref %outputs "out"))) | |
392 | ;; There is no test suite. | |
393 | #:tests? #f)) | |
394 | (home-page "http://byuu.org/emulation/higan/") | |
395 | (synopsis "Nintendo multi-system emulator") | |
396 | (description | |
397 | "higan (formerly bsnes) is an emulator for multiple Nintendo video game | |
398 | consoles, including the Nintendo Entertainment System (NES/Famicom), Super | |
399 | Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy | |
400 | Color (GBC), and Game Boy Advance (GBA). It also supports the subsystems | |
401 | Super Game Boy, BS-X Satellaview, and Sufami Turbo.") | |
402 | ;; As noted in these files among more: | |
403 | ;; - icarus/icarus.cpp | |
404 | ;; - higan/emulator/emulator.hpp | |
405 | (license license:gpl3))) | |
406 | ||
407 | (define-public mgba | |
408 | (package | |
409 | (name "mgba") | |
9c11ba92 | 410 | (version "0.7.2") |
9af704c5 | 411 | (source (origin |
6ea1c6fc RH |
412 | (method git-fetch) |
413 | (uri (git-reference | |
414 | (url "https://github.com/mgba-emu/mgba.git") | |
415 | (commit version))) | |
416 | (file-name (git-file-name name version)) | |
9af704c5 RH |
417 | (sha256 |
418 | (base32 | |
9c11ba92 | 419 | "0g0xa1mzvan0sl1p5c784j2g5mcw9kd2b7wiahy06gy0c1nmbcnp")) |
9af704c5 RH |
420 | (modules '((guix build utils))) |
421 | (snippet | |
422 | ;; Make sure we don't use the bundled software. | |
6cbee49d MW |
423 | '(begin |
424 | (for-each | |
425 | (lambda (subdir) | |
426 | (let ((lib-subdir (string-append "src/third-party/" subdir))) | |
427 | (delete-file-recursively lib-subdir))) | |
428 | '("libpng" "lzma" "sqlite3" "zlib")) | |
429 | #t)))) | |
9af704c5 RH |
430 | (build-system cmake-build-system) |
431 | (arguments | |
432 | `(#:tests? #f ;no "test" target | |
433 | #:configure-flags | |
434 | (list "-DUSE_LZMA=OFF" ;do not use bundled LZMA | |
6ea1c6fc | 435 | "-DUSE_LIBZIP=OFF"))) ;use "zlib" instead |
9af704c5 | 436 | (native-inputs `(("pkg-config" ,pkg-config))) |
6dcac920 | 437 | (inputs `(("ffmpeg" ,ffmpeg) |
9af704c5 RH |
438 | ("imagemagick" ,imagemagick) |
439 | ("libedit" ,libedit) | |
6dcac920 | 440 | ("libelf" ,libelf) |
9af704c5 RH |
441 | ("libepoxy" ,libepoxy) |
442 | ("libpng" ,libpng) | |
443 | ("mesa" ,mesa) | |
444 | ("minizip" ,minizip) | |
445 | ("ncurses" ,ncurses) | |
446 | ("qtbase" ,qtbase) | |
447 | ("qtmultimedia" ,qtmultimedia) | |
448 | ("qttools" ,qttools) | |
449 | ("sdl2" ,sdl2) | |
450 | ("sqlite" ,sqlite) | |
451 | ("zlib" ,zlib))) | |
452 | (home-page "https://mgba.io") | |
453 | (synopsis "Game Boy Advance emulator") | |
454 | (description | |
455 | "mGBA is an emulator for running Game Boy Advance games. It aims to be | |
456 | faster and more accurate than many existing Game Boy Advance emulators, as | |
457 | well as adding features that other emulators lack. It also supports Game Boy | |
458 | and Game Boy Color games.") | |
459 | ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+ and "inih.c" is | |
460 | ;; BSD-3. | |
461 | (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3)))) | |
462 | ||
463 | (define-public mupen64plus-core | |
464 | (package | |
465 | (name "mupen64plus-core") | |
466 | (version "2.5") | |
467 | (source | |
468 | (origin | |
10bcd4bb TGR |
469 | (method git-fetch) |
470 | (uri (git-reference | |
471 | (url "https://github.com/mupen64plus/mupen64plus-core.git") | |
472 | (commit version))) | |
473 | (file-name (git-file-name name version)) | |
9af704c5 | 474 | (sha256 |
10bcd4bb | 475 | (base32 "116fndl6652zrp1r6ag4xv3dzp1x52mlvadj8xwflq07fd5rhri1")))) |
9af704c5 RH |
476 | (build-system gnu-build-system) |
477 | (native-inputs | |
478 | `(("pkg-config" ,pkg-config) | |
479 | ("which" ,which))) | |
480 | (inputs | |
481 | `(("freetype" ,freetype) | |
482 | ("glu" ,glu) | |
483 | ("libpng" ,libpng) | |
484 | ("mesa" ,mesa) | |
485 | ("sdl2" ,sdl2) | |
486 | ("zlib" ,zlib))) | |
487 | (arguments | |
488 | '(#:phases | |
489 | (modify-phases %standard-phases | |
490 | ;; The mupen64plus build system has no configure phase. | |
491 | (delete 'configure) | |
492 | ;; Makefile is in a subdirectory. | |
493 | (add-before | |
494 | 'build 'cd-to-project-dir | |
495 | (lambda _ | |
496 | (chdir "projects/unix")))) | |
497 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
498 | (list "all" (string-append "PREFIX=" out))) | |
499 | ;; There are no tests. | |
500 | #:tests? #f)) | |
501 | ;; As per the Makefile (in projects/unix/Makefile): | |
502 | (supported-systems '("i686-linux" "x86_64-linux")) | |
503 | (home-page "http://www.mupen64plus.org/") | |
504 | (synopsis "Nintendo 64 emulator core library") | |
505 | (description | |
506 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
507 | which is capable of accurately playing many games. This package contains the | |
508 | core library.") | |
509 | (license license:gpl2+))) | |
510 | ||
511 | (define-public mupen64plus-audio-sdl | |
512 | (package | |
513 | (name "mupen64plus-audio-sdl") | |
514 | (version "2.5") | |
515 | (source | |
516 | (origin | |
8c6d45cb TGR |
517 | (method git-fetch) |
518 | (uri (git-reference | |
519 | (url "https://github.com/mupen64plus/mupen64plus-audio-sdl.git") | |
520 | (commit version))) | |
521 | (file-name (git-file-name name version)) | |
9af704c5 | 522 | (sha256 |
8c6d45cb | 523 | (base32 "0z19amfg9vr2pqjjri1ipc7hs681fzjcnb0f9y7bjhp5n8d7p6bb")))) |
9af704c5 RH |
524 | (build-system gnu-build-system) |
525 | (native-inputs | |
526 | `(("pkg-config" ,pkg-config) | |
527 | ("which" ,which))) | |
528 | (inputs | |
529 | `(("mupen64plus-core" ,mupen64plus-core) | |
530 | ("sdl2" ,sdl2))) | |
531 | (arguments | |
532 | '(#:phases | |
533 | (modify-phases %standard-phases | |
534 | ;; The mupen64plus build system has no configure phase. | |
535 | (delete 'configure) | |
536 | ;; Makefile is in a subdirectory. | |
537 | (add-before | |
538 | 'build 'cd-to-project-dir | |
539 | (lambda _ | |
540 | (chdir "projects/unix")))) | |
541 | #:make-flags | |
542 | (let ((out (assoc-ref %outputs "out")) | |
543 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
544 | (list "all" | |
545 | (string-append "PREFIX=" out) | |
546 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
547 | ;; There are no tests. | |
548 | #:tests? #f)) | |
549 | (home-page "http://www.mupen64plus.org/") | |
550 | (synopsis "Mupen64Plus SDL input plugin") | |
551 | (description | |
552 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
553 | which is capable of accurately playing many games. This package contains the | |
554 | SDL audio plugin.") | |
555 | (license license:gpl2+))) | |
556 | ||
557 | (define-public mupen64plus-input-sdl | |
558 | (package | |
559 | (name "mupen64plus-input-sdl") | |
560 | (version "2.5") | |
561 | (source | |
562 | (origin | |
ef5ef8f5 TGR |
563 | (method git-fetch) |
564 | (uri (git-reference | |
565 | (url "https://github.com/mupen64plus/mupen64plus-input-sdl.git") | |
566 | (commit version))) | |
567 | (file-name (git-file-name name version)) | |
9af704c5 | 568 | (sha256 |
ef5ef8f5 | 569 | (base32 "1dyazfbdjycdfslq8jixqiqhziw0rlkvach2r9dz91229jmkyc9c")))) |
9af704c5 RH |
570 | (build-system gnu-build-system) |
571 | (native-inputs | |
572 | `(("which" ,which))) | |
573 | (inputs | |
574 | `(("mupen64plus-core" ,mupen64plus-core) | |
575 | ("sdl2" ,sdl2))) | |
576 | (arguments | |
577 | '(#:phases | |
578 | (modify-phases %standard-phases | |
579 | ;; The mupen64plus build system has no configure phase. | |
580 | (delete 'configure) | |
581 | ;; Makefile is in a subdirectory. | |
582 | (add-before | |
583 | 'build 'cd-to-project-dir | |
584 | (lambda _ | |
585 | (chdir "projects/unix")))) | |
586 | #:make-flags | |
587 | (let ((out (assoc-ref %outputs "out")) | |
588 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
589 | (list "all" | |
590 | (string-append "PREFIX=" out) | |
591 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
592 | ;; There are no tests. | |
593 | #:tests? #f)) | |
594 | (home-page "http://www.mupen64plus.org/") | |
595 | (synopsis "Mupen64Plus SDL input plugin") | |
596 | (description | |
597 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
598 | which is capable of accurately playing many games. This package contains the | |
599 | SDL input plugin.") | |
600 | (license license:gpl2+))) | |
601 | ||
602 | (define-public mupen64plus-rsp-hle | |
603 | (package | |
604 | (name "mupen64plus-rsp-hle") | |
605 | (version "2.5") | |
606 | (source | |
607 | (origin | |
c4f0c8ba TGR |
608 | (method git-fetch) |
609 | (uri (git-reference | |
610 | (url "https://github.com/mupen64plus/mupen64plus-rsp-hle.git") | |
611 | (commit version))) | |
612 | (file-name (git-file-name name version)) | |
9af704c5 | 613 | (sha256 |
c4f0c8ba | 614 | (base32 "0pi31qzjjp7aypdvvnz6ms18g09c4gqzxi6328zj8sji94b75gf0")))) |
9af704c5 RH |
615 | (build-system gnu-build-system) |
616 | (inputs | |
617 | `(("mupen64plus-core" ,mupen64plus-core))) | |
618 | (arguments | |
619 | '(#:phases | |
620 | (modify-phases %standard-phases | |
621 | ;; The mupen64plus build system has no configure phase. | |
622 | (delete 'configure) | |
623 | ;; Makefile is in a subdirectory. | |
624 | (add-before | |
625 | 'build 'cd-to-project-dir | |
626 | (lambda _ | |
627 | (chdir "projects/unix")))) | |
628 | #:make-flags | |
629 | (let ((out (assoc-ref %outputs "out")) | |
630 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
631 | (list "all" | |
632 | (string-append "PREFIX=" out) | |
633 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
634 | ;; There are no tests. | |
635 | #:tests? #f)) | |
636 | (home-page "http://www.mupen64plus.org/") | |
637 | (synopsis "Mupen64Plus SDL input plugin") | |
638 | (description | |
639 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
640 | which is capable of accurately playing many games. This package contains the | |
641 | high-level emulation (HLE) RSP processor plugin.") | |
642 | (license license:gpl2+))) | |
643 | ||
644 | (define-public mupen64plus-rsp-z64 | |
645 | (package | |
646 | (name "mupen64plus-rsp-z64") | |
647 | (version "2.0.0") | |
648 | (source | |
649 | (origin | |
052650c8 TGR |
650 | (method git-fetch) |
651 | (uri (git-reference | |
652 | (url "https://github.com/mupen64plus/mupen64plus-rsp-z64.git") | |
653 | (commit version))) | |
654 | (file-name (git-file-name name version)) | |
9af704c5 | 655 | (sha256 |
052650c8 | 656 | (base32 "0nfyjns9k8xbg3aqs7593nfaxvlj72h3l8h467442xlk8ajfcylx")))) |
9af704c5 RH |
657 | (build-system gnu-build-system) |
658 | (inputs | |
659 | `(("mupen64plus-core" ,mupen64plus-core))) | |
660 | (arguments | |
661 | '(#:phases | |
662 | (modify-phases %standard-phases | |
663 | ;; The mupen64plus build system has no configure phase. | |
664 | (delete 'configure) | |
665 | ;; Makefile is in a subdirectory. | |
666 | (add-before | |
667 | 'build 'cd-to-project-dir | |
668 | (lambda _ | |
669 | (chdir "projects/unix")))) | |
670 | #:make-flags | |
671 | (let ((out (assoc-ref %outputs "out")) | |
672 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
673 | (list "all" | |
674 | (string-append "PREFIX=" out) | |
675 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
676 | ;; There are no tests. | |
677 | #:tests? #f)) | |
678 | (home-page "http://www.mupen64plus.org/") | |
679 | (synopsis "Mupen64Plus SDL input plugin") | |
680 | (description | |
681 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
682 | which is capable of accurately playing many games. This package contains the | |
683 | Z64 RSP processor plugin.") | |
684 | (license license:gpl2+))) | |
685 | ||
686 | (define-public mupen64plus-video-arachnoid | |
687 | (package | |
688 | (name "mupen64plus-video-arachnoid") | |
689 | (version "2.0.0") | |
690 | (source | |
691 | (origin | |
2074c8bf TGR |
692 | (method git-fetch) |
693 | (uri (git-reference | |
694 | (url "https://github.com/mupen64plus/mupen64plus-video-arachnoid.git") | |
695 | (commit version))) | |
696 | (file-name (git-file-name name version)) | |
9af704c5 | 697 | (sha256 |
2074c8bf | 698 | (base32 "1v9fqwpb6pawr8z5cm2ki7bqkks4iyr5c4jy4v5khj6h8zcv55gc")))) |
9af704c5 RH |
699 | (build-system gnu-build-system) |
700 | (native-inputs | |
701 | `(("pkg-config" ,pkg-config) | |
702 | ("which" ,which))) | |
703 | (inputs | |
704 | `(("mesa" ,mesa) | |
705 | ("mupen64plus-core" ,mupen64plus-core))) | |
706 | (arguments | |
707 | '(#:phases | |
708 | (modify-phases %standard-phases | |
709 | ;; The mupen64plus build system has no configure phase. | |
710 | (delete 'configure) | |
711 | ;; Makefile is in a subdirectory. | |
712 | (add-before | |
713 | 'build 'cd-to-project-dir | |
714 | (lambda _ | |
715 | (chdir "projects/unix")))) | |
716 | #:make-flags | |
717 | (let ((out (assoc-ref %outputs "out")) | |
718 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
719 | (list "all" | |
720 | (string-append "PREFIX=" out) | |
721 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
722 | ;; There are no tests. | |
723 | #:tests? #f)) | |
724 | (home-page "http://www.mupen64plus.org/") | |
725 | (synopsis "Mupen64Plus Rice Video plugin") | |
726 | (description | |
727 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
728 | which is capable of accurately playing many games. This package contains the | |
729 | Arachnoid video plugin.") | |
730 | (license license:gpl2+))) | |
731 | ||
732 | (define-public mupen64plus-video-glide64 | |
733 | (package | |
734 | (name "mupen64plus-video-glide64") | |
735 | (version "2.0.0") | |
736 | (source | |
737 | (origin | |
62536186 TGR |
738 | (method git-fetch) |
739 | (uri (git-reference | |
740 | (url "https://github.com/mupen64plus/mupen64plus-video-glide64.git") | |
741 | (commit version))) | |
742 | (file-name (git-file-name name version)) | |
9af704c5 | 743 | (sha256 |
62536186 | 744 | (base32 "0qn5za7g7796kh2ag3xpmhbqg0yf71g9liz6ks0rha8pz73lgs01")))) |
9af704c5 RH |
745 | (build-system gnu-build-system) |
746 | (native-inputs | |
747 | `(("pkg-config" ,pkg-config) | |
748 | ("which" ,which))) | |
749 | (inputs | |
750 | `(("mesa" ,mesa) | |
751 | ("mupen64plus-core" ,mupen64plus-core) | |
752 | ("sdl2" ,sdl2))) | |
753 | (arguments | |
754 | '(#:phases | |
755 | (modify-phases %standard-phases | |
756 | ;; The mupen64plus build system has no configure phase. | |
757 | (delete 'configure) | |
758 | ;; Makefile is in a subdirectory. | |
759 | (add-before | |
760 | 'build 'cd-to-project-dir | |
761 | (lambda _ | |
762 | (chdir "projects/unix"))) | |
763 | ;; XXX Should be unnecessary with the next release. | |
764 | (add-before | |
765 | 'build 'use-sdl2 | |
766 | (lambda _ | |
767 | (substitute* "Makefile" | |
768 | (("SDL_CONFIG = (.*)sdl-config" all prefix) | |
769 | (string-append "SDL_CONFIG = " prefix "sdl2-config")))))) | |
770 | #:make-flags | |
771 | (let ((out (assoc-ref %outputs "out")) | |
772 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
773 | (list "all" | |
774 | (string-append "PREFIX=" out) | |
775 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
776 | ;; There are no tests. | |
777 | #:tests? #f)) | |
778 | (home-page "http://www.mupen64plus.org/") | |
779 | (synopsis "Mupen64Plus Rice Video plugin") | |
780 | (description | |
781 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
782 | which is capable of accurately playing many games. This package contains the | |
783 | Glide64 video plugin.") | |
784 | (license license:gpl2+))) | |
785 | ||
786 | (define-public mupen64plus-video-glide64mk2 | |
787 | (package | |
788 | (name "mupen64plus-video-glide64mk2") | |
789 | (version "2.5") | |
790 | (source | |
791 | (origin | |
e5e7a167 TGR |
792 | (method git-fetch) |
793 | (uri (git-reference | |
794 | (url "https://github.com/mupen64plus/mupen64plus-video-glide64mk2.git") | |
795 | (commit version))) | |
796 | (file-name (git-file-name name version)) | |
9af704c5 | 797 | (sha256 |
e5e7a167 | 798 | (base32 "08pm28a36dpr0cvr8pzw0n5ksdazp7jqvlmqfy2lwb4dm0cwhkqd")))) |
9af704c5 RH |
799 | (build-system gnu-build-system) |
800 | (native-inputs | |
801 | `(("pkg-config" ,pkg-config) | |
802 | ("which" ,which))) | |
803 | (inputs | |
804 | `(("boost" ,boost) | |
805 | ("libpng" ,libpng) | |
806 | ("mesa" ,mesa) | |
807 | ("mupen64plus-core" ,mupen64plus-core) | |
808 | ("sdl2" ,sdl2) | |
809 | ("zlib" ,zlib))) | |
810 | (arguments | |
811 | '(#:phases | |
812 | (modify-phases %standard-phases | |
813 | ;; The mupen64plus build system has no configure phase. | |
814 | (delete 'configure) | |
815 | ;; Makefile is in a subdirectory. | |
816 | (add-before | |
817 | 'build 'cd-to-project-dir | |
818 | (lambda _ | |
819 | (chdir "projects/unix")))) | |
820 | #:make-flags | |
821 | (let ((out (assoc-ref %outputs "out")) | |
822 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
823 | (list "all" | |
824 | (string-append "PREFIX=" out) | |
825 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
826 | ;; There are no tests. | |
827 | #:tests? #f)) | |
828 | (home-page "http://www.mupen64plus.org/") | |
829 | (synopsis "Mupen64Plus Rice Video plugin") | |
830 | (description | |
831 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
832 | which is capable of accurately playing many games. This package contains the | |
833 | Glide64MK2 video plugin.") | |
834 | (license license:gpl2+))) | |
835 | ||
836 | (define-public mupen64plus-video-rice | |
837 | (package | |
838 | (name "mupen64plus-video-rice") | |
839 | (version "2.5") | |
840 | (source | |
841 | (origin | |
d42d0a0b TGR |
842 | (method git-fetch) |
843 | (uri (git-reference | |
844 | (url "https://github.com/mupen64plus/mupen64plus-video-rice.git") | |
845 | (commit version))) | |
846 | (file-name (git-file-name name version)) | |
9af704c5 | 847 | (sha256 |
d42d0a0b | 848 | (base32 "0rpmbcq67gsj5h5jjis146378qc1mskskvx20y1ikx59yhbamh13")))) |
9af704c5 RH |
849 | (build-system gnu-build-system) |
850 | (native-inputs | |
851 | `(("pkg-config" ,pkg-config) | |
852 | ("which" ,which))) | |
853 | (inputs | |
854 | `(("libpng" ,libpng) | |
855 | ("mesa" ,mesa) | |
856 | ("mupen64plus-core" ,mupen64plus-core) | |
857 | ("sdl2" ,sdl2))) | |
858 | (arguments | |
859 | '(#:phases | |
860 | (modify-phases %standard-phases | |
861 | ;; The mupen64plus build system has no configure phase. | |
862 | (delete 'configure) | |
863 | ;; Makefile is in a subdirectory. | |
864 | (add-before | |
865 | 'build 'cd-to-project-dir | |
866 | (lambda _ | |
867 | (chdir "projects/unix")))) | |
868 | #:make-flags | |
869 | (let ((out (assoc-ref %outputs "out")) | |
870 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
871 | (list "all" | |
872 | (string-append "PREFIX=" out) | |
873 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
874 | ;; There are no tests. | |
875 | #:tests? #f)) | |
876 | (home-page "http://www.mupen64plus.org/") | |
877 | (synopsis "Mupen64Plus Rice Video plugin") | |
878 | (description | |
879 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
880 | which is capable of accurately playing many games. This package contains the | |
881 | Rice Video plugin.") | |
882 | (license license:gpl2+))) | |
883 | ||
884 | (define-public mupen64plus-video-z64 | |
885 | (package | |
886 | (name "mupen64plus-video-z64") | |
887 | (version "2.0.0") | |
888 | (source | |
889 | (origin | |
85baeb20 TGR |
890 | (method git-fetch) |
891 | (uri (git-reference | |
892 | (url "https://github.com/mupen64plus/mupen64plus-video-z64.git") | |
893 | (commit version))) | |
894 | (file-name (git-file-name name version)) | |
9af704c5 | 895 | (sha256 |
85baeb20 | 896 | (base32 "04qa2fdd6dakpk2v0d4l80xh9b4h8gm71g80c0wyyxdhmhwk1r9c")) |
fdb61400 | 897 | (patches (search-patches "mupen64plus-video-z64-glew-correct-path.patch")))) |
9af704c5 RH |
898 | (build-system gnu-build-system) |
899 | (native-inputs | |
900 | `(("pkg-config" ,pkg-config) | |
901 | ("which" ,which))) | |
902 | (inputs | |
903 | `(("glew" ,glew) | |
904 | ("mupen64plus-core" ,mupen64plus-core) | |
905 | ("sdl2" ,sdl2))) | |
906 | (arguments | |
907 | '(#:phases | |
908 | (modify-phases %standard-phases | |
909 | ;; The mupen64plus build system has no configure phase. | |
910 | (delete 'configure) | |
911 | ;; Makefile is in a subdirectory. | |
912 | (add-before | |
913 | 'build 'cd-to-project-dir | |
914 | (lambda _ | |
915 | (chdir "projects/unix"))) | |
916 | ;; XXX Should be unnecessary with the next release. | |
917 | (add-before | |
918 | 'build 'use-sdl2 | |
919 | (lambda _ | |
920 | (substitute* "Makefile" | |
921 | (("SDL_CONFIG = (.*)sdl-config" all prefix) | |
922 | (string-append "SDL_CONFIG = " prefix "sdl2-config")))))) | |
923 | #:make-flags | |
924 | (let ((out (assoc-ref %outputs "out")) | |
925 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
926 | (list "all" | |
927 | (string-append "PREFIX=" out) | |
928 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
929 | ;; There are no tests. | |
930 | #:tests? #f)) | |
931 | (home-page "http://www.mupen64plus.org/") | |
932 | (synopsis "Mupen64Plus Z64 video plugin") | |
933 | (description | |
934 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
935 | which is capable of accurately playing many games. This package contains the | |
936 | Z64 video plugin.") | |
937 | (license license:gpl2+))) | |
938 | ||
939 | (define-public mupen64plus-ui-console | |
940 | (package | |
941 | (name "mupen64plus-ui-console") | |
942 | (version "2.5") | |
943 | (source | |
944 | (origin | |
225157a0 TGR |
945 | (method git-fetch) |
946 | (uri (git-reference | |
947 | (url "https://github.com/mupen64plus/mupen64plus-ui-console.git") | |
948 | (commit version))) | |
949 | (file-name (git-file-name name version)) | |
9af704c5 | 950 | (sha256 |
225157a0 | 951 | (base32 "0vrf98qa6a0y3647kslsv644fag233dxh5dcr1yncjiiwickcr5a")) |
9af704c5 RH |
952 | (patches (search-patches "mupen64plus-ui-console-notice.patch")))) |
953 | (build-system gnu-build-system) | |
954 | (native-inputs | |
955 | `(("pkg-config" ,pkg-config) | |
956 | ("which" ,which))) | |
957 | (inputs | |
958 | `(("sdl2" ,sdl2))) | |
959 | ;; Mupen64Plus supports a single data directory and a single plugin | |
960 | ;; directory in its configuration, yet we need data and plugin files from | |
961 | ;; a variety of packages. The best way to deal with this is to install | |
962 | ;; all packages from which data and plugin files are needed into one's | |
963 | ;; profile, and point the configuration there. Hence, propagate the most | |
964 | ;; important packages here to save the user from the bother. The patch | |
965 | ;; mupen64plus-ui-console-notice also gives users instructions on what | |
966 | ;; they need to do in order to point the configuration to their profile. | |
967 | (propagated-inputs | |
968 | `(("mupen64plus-core" ,mupen64plus-core) | |
969 | ("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl) | |
970 | ("mupen64plus-input-sdl" ,mupen64plus-input-sdl) | |
971 | ("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle) | |
972 | ("mupen64plus-video-glide64" ,mupen64plus-video-glide64) | |
973 | ("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2) | |
974 | ("mupen64plus-video-rice" ,mupen64plus-video-rice))) | |
975 | (arguments | |
976 | '(#:phases | |
977 | (modify-phases %standard-phases | |
978 | ;; The mupen64plus build system has no configure phase. | |
979 | (delete 'configure) | |
980 | ;; Makefile is in a subdirectory. | |
981 | (add-before | |
982 | 'build 'cd-to-project-dir | |
983 | (lambda _ | |
984 | (chdir "projects/unix")))) | |
985 | #:make-flags | |
986 | (let ((out (assoc-ref %outputs "out")) | |
987 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
988 | (list "all" | |
989 | (string-append "PREFIX=" out) | |
990 | (string-append "APIDIR=" m64p "/include/mupen64plus") | |
991 | ;; Trailing slash matters here. | |
992 | (string-append "COREDIR=" m64p "/lib/"))) | |
993 | ;; There are no tests. | |
994 | #:tests? #f)) | |
995 | (home-page "http://www.mupen64plus.org/") | |
996 | (synopsis "Mupen64Plus SDL input plugin") | |
997 | (description | |
998 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
999 | which is capable of accurately playing many games. This package contains the | |
1000 | command line user interface. Installing this package is the easiest way | |
1001 | towards a working Mupen64Plus for casual users.") | |
1002 | (license license:gpl2+))) | |
1003 | ||
1004 | (define-public nestopia-ue | |
1005 | (package | |
1006 | (name "nestopia-ue") | |
9d39c300 | 1007 | (version "1.48") |
3e461b71 TGR |
1008 | (source |
1009 | (origin | |
1010 | (method git-fetch) | |
1011 | (uri (git-reference | |
1012 | (url "https://github.com/rdanbrook/nestopia.git") | |
1013 | (commit version))) | |
1014 | (file-name (git-file-name name version)) | |
1015 | (sha256 | |
1016 | (base32 "19c8vx5yxbysl0sszk5blfngwacshdgwbf44g1qaxvq8ywiyxmb4")) | |
1017 | (modules '((guix build utils))) | |
1018 | (snippet | |
1019 | '(begin | |
1020 | ;; We don't need libretro for the GNU/Linux build. | |
1021 | (delete-file-recursively "libretro") | |
1022 | #t)))) | |
9d39c300 | 1023 | (build-system cmake-build-system) |
9af704c5 RH |
1024 | (native-inputs |
1025 | `(("pkg-config" ,pkg-config))) | |
1026 | (inputs | |
1027 | `(("ao" ,ao) | |
9af704c5 RH |
1028 | ("gtk+" ,gtk+) |
1029 | ("libarchive" ,libarchive) | |
9d39c300 | 1030 | ("libepoxy" ,libepoxy) |
9af704c5 RH |
1031 | ("sdl2" ,sdl2) |
1032 | ("zlib" ,zlib))) | |
1033 | (arguments | |
1034 | '(#:phases | |
1035 | (modify-phases %standard-phases | |
9d39c300 KK |
1036 | ;; This fixes the file chooser crash that happens with GTK 3. |
1037 | (add-after 'install 'wrap-program | |
1038 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1039 | (let* ((out (assoc-ref outputs "out")) | |
1040 | (nestopia (string-append out "/bin/nestopia")) | |
1041 | (gtk (assoc-ref inputs "gtk+")) | |
1042 | (gtk-share (string-append gtk "/share"))) | |
1043 | (wrap-program nestopia | |
1044 | `("XDG_DATA_DIRS" ":" prefix (,gtk-share))))))) | |
9af704c5 RH |
1045 | ;; There are no tests. |
1046 | #:tests? #f)) | |
1047 | (home-page "http://0ldsk00l.ca/nestopia/") | |
1048 | (synopsis "Nintendo Entertainment System (NES/Famicom) emulator") | |
1049 | (description | |
1050 | "Nestopia UE (Undead Edition) is a fork of the Nintendo Entertainment | |
1051 | System (NES/Famicom) emulator Nestopia, with enhancements from members of the | |
1052 | emulation community. It provides highly accurate emulation.") | |
1053 | (license license:gpl2+))) | |
1054 | ||
1055 | (define-public retroarch | |
1056 | (package | |
1057 | (name "retroarch") | |
aa986c9c | 1058 | (version "1.7.7") |
9af704c5 RH |
1059 | (source |
1060 | (origin | |
1fc346de TGR |
1061 | (method git-fetch) |
1062 | (uri (git-reference | |
1063 | (url "https://github.com/libretro/RetroArch.git") | |
1064 | (commit (string-append "v" version)))) | |
1065 | (file-name (git-file-name name version)) | |
9af704c5 | 1066 | (sha256 |
aa986c9c | 1067 | (base32 "026720z0vpiwr4da7l2x2yinns09fmg6yxsib203xwnixj399azi")))) |
9af704c5 RH |
1068 | (build-system gnu-build-system) |
1069 | (arguments | |
f21967a4 | 1070 | `(#:tests? #f ; no tests |
9af704c5 RH |
1071 | #:phases |
1072 | (modify-phases %standard-phases | |
1073 | (replace 'configure | |
1074 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1075 | (let* ((out (assoc-ref outputs "out")) | |
1076 | (etc (string-append out "/etc")) | |
12a3abc6 RH |
1077 | (vulkan (assoc-ref inputs "vulkan-loader")) |
1078 | (wayland-protocols (assoc-ref inputs "wayland-protocols"))) | |
9af704c5 RH |
1079 | ;; Hard-code the path to libvulkan.so. |
1080 | (substitute* "gfx/common/vulkan_common.c" | |
1081 | (("libvulkan.so") (string-append vulkan "/lib/libvulkan.so"))) | |
12a3abc6 RH |
1082 | (substitute* "gfx/common/wayland/generate_wayland_protos.sh" |
1083 | (("/usr/local/share/wayland-protocols") | |
1084 | (string-append wayland-protocols "/share/wayland-protocols"))) | |
9af704c5 RH |
1085 | (substitute* "qb/qb.libs.sh" |
1086 | (("/bin/true") (which "true"))) | |
fade67ab EF |
1087 | ;; Use shared zlib. |
1088 | (substitute* '("libretro-common/file/archive_file_zlib.c" | |
1089 | "libretro-common/streams/trans_stream_zlib.c" | |
1090 | "network/httpserver/httpserver.c") | |
1091 | (("<compat/zlib.h>") "<zlib.h>")) | |
9af704c5 RH |
1092 | ;; The configure script does not yet accept the extra arguments |
1093 | ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase. | |
f21967a4 EF |
1094 | (invoke |
1095 | "./configure" | |
1096 | ,@(if (string-prefix? "armhf" (or (%current-target-system) | |
1097 | (%current-system))) | |
1098 | '("--enable-neon" "--enable-floathard") | |
1099 | '()) | |
1100 | (string-append "--prefix=" out) | |
1101 | (string-append "--global-config-dir=" etc)))))))) | |
9af704c5 RH |
1102 | (inputs |
1103 | `(("alsa-lib" ,alsa-lib) | |
1104 | ("ffmpeg" ,ffmpeg) | |
1105 | ("freetype" ,freetype) | |
1106 | ("libxinerama" ,libxinerama) | |
1107 | ("libxkbcommon" ,libxkbcommon) | |
1108 | ("libxml2" ,libxml2) | |
45267af1 | 1109 | ("libxrandr" ,libxrandr) |
9af704c5 RH |
1110 | ("libxv" ,libxv) |
1111 | ("mesa" ,mesa) | |
1112 | ("openal" ,openal) | |
1113 | ("pulseaudio" ,pulseaudio) | |
1114 | ("python" ,python) | |
76b7d8fd | 1115 | ("qtbase" ,qtbase) |
9af704c5 RH |
1116 | ("sdl" ,sdl2) |
1117 | ("udev" ,eudev) | |
e6fcf903 | 1118 | ("vulkan-loader" ,vulkan-loader) |
c695fb76 | 1119 | ("wayland" ,wayland) |
9af704c5 RH |
1120 | ("zlib" ,zlib))) |
1121 | (native-inputs | |
1122 | `(("pkg-config" ,pkg-config) | |
12a3abc6 | 1123 | ("wayland-protocols" ,wayland-protocols) |
9af704c5 RH |
1124 | ("which" ,which))) |
1125 | (home-page "https://www.libretro.com/") | |
1126 | (synopsis "Reference frontend for the libretro API") | |
1127 | (description | |
1128 | "Libretro is a simple but powerful development interface that allows for | |
1129 | the easy creation of emulators, games and multimedia applications that can plug | |
1130 | straight into any libretro-compatible frontend. RetroArch is the official | |
1131 | reference frontend for the libretro API, currently used by most as a modular | |
1132 | multi-system game/emulator system.") | |
1133 | (license license:gpl3+))) | |
4c40ed9d NG |
1134 | |
1135 | (define-public scummvm | |
1136 | (package | |
1137 | (name "scummvm") | |
1138 | (version "2.0.0") | |
1139 | (source | |
1140 | (origin | |
1141 | (method url-fetch) | |
1142 | (uri (string-append "http://www.scummvm.org/frs/scummvm/" version | |
1143 | "/scummvm-" version ".tar.xz")) | |
1144 | (sha256 | |
1145 | (base32 | |
1146 | "0q6aiw97wsrf8cjw9vjilzhqqsr2rw2lll99s8i5i9svan6l314p")))) | |
1147 | (build-system gnu-build-system) | |
1148 | (arguments | |
1149 | `(#:tests? #f ;require "git" | |
1150 | #:configure-flags (list "--enable-release") ;for optimizations | |
1151 | #:phases | |
1152 | (modify-phases %standard-phases | |
1153 | (replace 'configure | |
1154 | ;; configure does not work followed by both "SHELL=..." and | |
1155 | ;; "CONFIG_SHELL=..."; set environment variables instead | |
1156 | (lambda* (#:key outputs configure-flags #:allow-other-keys) | |
1157 | (let* ((out (assoc-ref outputs "out")) | |
1158 | (bash (which "bash")) | |
1159 | (flags `(,(string-append "--prefix=" out) | |
1160 | ,@configure-flags))) | |
1161 | (setenv "SHELL" bash) | |
1162 | (setenv "CONFIG_SHELL" bash) | |
1163 | (apply invoke "./configure" flags))))))) | |
1164 | (native-inputs | |
1165 | `(("pkg-config" ,pkg-config))) | |
1166 | (inputs | |
1167 | `(("alsa-lib" ,alsa-lib) | |
1168 | ("faad2" ,faad2) | |
1169 | ("fluidsynth" ,fluidsynth) | |
1170 | ("freetype" ,freetype) | |
1171 | ("libflac" ,flac) | |
1172 | ("libjpeg-turbo" ,libjpeg-turbo) | |
1173 | ("libmad" ,libmad) | |
1174 | ("libmpeg2" ,libmpeg2) | |
1175 | ("libogg" ,libogg) | |
1176 | ("libpng" ,libpng) | |
1177 | ("libtheora" ,libtheora) | |
1178 | ("libvorbis" ,libvorbis) | |
1179 | ("nasm" ,nasm) | |
1180 | ("sdl2" ,sdl2) | |
1181 | ("zlib" ,zlib))) | |
1182 | (home-page "https://www.scummvm.org/") | |
1183 | (synopsis "Engine for several graphical adventure games") | |
1184 | (description "ScummVM is a program which allows you to run certain | |
1185 | classic graphical point-and-click adventure games, provided you | |
1186 | already have their data files. The clever part about this: ScummVM | |
1187 | just replaces the executables shipped with the games, allowing you to | |
1188 | play them on systems for which they were never designed!") | |
1189 | (license license:gpl2+))) | |
c8b2fd28 NG |
1190 | |
1191 | (define-public mame | |
1192 | (package | |
1193 | (name "mame") | |
9f0650df | 1194 | (version "0.210") |
c8b2fd28 NG |
1195 | (source |
1196 | (origin | |
1197 | (method git-fetch) | |
1198 | (uri (git-reference | |
1199 | (url "https://github.com/mamedev/mame.git") | |
1200 | (commit (apply string-append "mame" (string-split version #\.))))) | |
1201 | (file-name (git-file-name name version)) | |
1202 | (sha256 | |
1203 | (base32 | |
9f0650df | 1204 | "08c62mc8aajzh44q36qvmrcq404hdzh3i8wwdfnvn0c4w8dbf486")) |
c8b2fd28 NG |
1205 | (modules '((guix build utils))) |
1206 | (snippet | |
1207 | ;; Remove bundled libraries. | |
1208 | '(begin | |
1209 | (with-directory-excursion "3rdparty" | |
1210 | (for-each delete-file-recursively | |
1211 | '("asio" "expat" "glm" "libflac" "libjpeg" "lua" | |
1212 | "portaudio" "portmidi" "pugixml" "rapidjson" "SDL2" | |
1213 | "SDL2-override" "sqlite3" "utf8proc" "zlib"))) | |
1214 | #t)))) | |
1215 | (build-system gnu-build-system) | |
1216 | (arguments | |
1217 | `(#:make-flags | |
1218 | (cons* | |
1219 | (string-append "QT_HOME=" (assoc-ref %build-inputs "qtbase")) | |
1220 | (string-append "SDL_INI_PATH=" | |
1221 | (assoc-ref %outputs "out") | |
1222 | "/share/mame/ini") | |
1223 | (map (lambda (lib) | |
1224 | (string-append "USE_SYSTEM_LIB_" (string-upcase lib) "=1")) | |
1225 | '("asio" "expat" "flac" "glm" "jpeg" "lua" "portaudio" "portmidi" | |
1226 | "pugixml" "rapidjson" "sqlite3" "utf8proc" "zlib"))) | |
1227 | #:tests? #f ;no test in regular release | |
1228 | #:phases | |
1229 | (modify-phases %standard-phases | |
1230 | (delete 'configure) | |
1231 | (add-after 'build 'build-documentation | |
1232 | (lambda _ (invoke "make" "-C" "docs" "man" "info"))) | |
1233 | (replace 'install | |
1234 | ;; Upstream does not provide an installation phase. | |
1235 | (lambda* (#:key outputs #:allow-other-keys) | |
1236 | (let* ((out (assoc-ref outputs "out")) | |
1237 | (share (string-append out "/share/mame"))) | |
1238 | ;; Install data. | |
1239 | (for-each (lambda (dir) | |
1240 | (copy-recursively dir (string-append share "/" dir))) | |
1241 | '("artwork" "bgfx" "ctrlr" "hash" "ini" "language" | |
1242 | "plugins" "samples")) | |
1243 | (let ((keymaps (string-append share "/keymaps"))) | |
1244 | (for-each (lambda (file) (install-file file keymaps)) | |
1245 | (find-files "keymaps" ".*LINUX\\.map"))) | |
1246 | (let ((fonts (string-append share "/fonts"))) | |
1247 | (install-file "uismall.bdf" fonts)) | |
6921e95a EF |
1248 | (when (file-exists? "mame64") |
1249 | (rename-file "mame64" "mame")) | |
c8b2fd28 NG |
1250 | (install-file "mame" (string-append out "/bin"))) |
1251 | #t)) | |
1252 | (add-after 'install 'install-documentation | |
1253 | (lambda* (#:key outputs #:allow-other-keys) | |
1254 | (let* ((out (assoc-ref outputs "out")) | |
1255 | (man (string-append out "/share/man/man1")) | |
1256 | (info (string-append out "/share/info"))) | |
1257 | (install-file "docs/build/man/MAME.1" man) | |
1258 | (install-file "docs/build/texinfo/MAME.info" info)) | |
1259 | #t)) | |
1260 | (add-after 'install 'install-ini-file | |
1261 | ;; Generate an ini file so as to set some directories (e.g., roms) | |
1262 | ;; to a writable location, i.e., "$HOME/.mame/" and "$HOME/mame/". | |
1263 | ;; | |
1264 | ;; XXX: We need to insert absolute references to the store. It can | |
1265 | ;; be an issue if they leak into user's home directory, e.g., with | |
1266 | ;; "mame -createconfig" and the package is later GC'ed. | |
1267 | (lambda* (#:key outputs #:allow-other-keys) | |
1268 | (let* ((out (assoc-ref outputs "out")) | |
1269 | (share (string-append out "/share/mame")) | |
1270 | (ini (string-append share "/ini"))) | |
1271 | (with-output-to-file (string-append ini "/mame.ini") | |
1272 | (lambda _ | |
1273 | (format #t | |
1274 | "inipath $HOME/.mame;~a/ini~@ | |
1275 | homepath $HOME/mame~@ | |
1276 | rompath $HOME/mame/roms~@ | |
1277 | samplepath $HOME/mame/samples;~a/samples~@ | |
1278 | cheatpath $HOME/mame/cheat~@ | |
1279 | artpath $HOME/mame/artwork;~a/artwork~@ | |
1280 | crosshairpath $HOME/mame/crosshair~@ | |
1281 | snapshot_directory $HOME/mame/snapshots~@ | |
1282 | hashpath ~a/hash~@ | |
1283 | fontpath $HOME/mame/fonts;~a/fonts~@ | |
1284 | ctrlrpath $HOME/mame/ctrlr;~a/ctrlr~@ | |
1285 | bgfx_path ~a/bgfx~@ | |
1286 | pluginspath $HOME/mame/plugins;~a/plugins~@ | |
1287 | languagepath ~a/language~@ | |
1288 | cfg_directory $HOME/.mame/cfg~@ | |
1289 | nvram_directory $HOME/.mame/nvram~@ | |
1290 | input_directory $HOME/.mame/inp~@ | |
1291 | state_directory $HOME/.mame/sta~@ | |
1292 | diff_directory $HOME/.mame/diff~@ | |
1293 | comment_directory $HOME/.mame/comments~%" | |
1294 | share share share share share share share share | |
1295 | share))) | |
1296 | (with-output-to-file (string-append ini "/ui.ini") | |
1297 | (lambda _ | |
1298 | (format #t | |
1299 | "historypath $HOME/mame/history~@ | |
1300 | categorypath $HOME/mame/folders~@ | |
1301 | cabinets_directory $HOME/mame/cabinets~@ | |
1302 | cpanels_directory $HOME/mame/cpanel~@ | |
1303 | pcbs_directory $HOME/mame/pcb~@ | |
1304 | flyers_directory $HOME/mame/flyers~@ | |
1305 | titles_directory $HOME/mame/titles~@ | |
1306 | ends_directory $HOME/mame/ends~@ | |
1307 | marquees_directory $HOME/mame/marquees~@ | |
1308 | artwork_preview_directory $HOME/mame/artpreview~@ | |
1309 | bosses_directory $HOME/mame/bosses~@ | |
1310 | logos_directory $HOME/mame/logo~@ | |
1311 | scores_directory $HOME/mame/scores~@ | |
1312 | versus_directory $HOME/mame/versus~@ | |
1313 | gameover_directory $HOME/mame/gameover~@ | |
1314 | howto_directory $HOME/mame/howto~@ | |
1315 | select_directory $HOME/mame/select~@ | |
1316 | icons_directory $HOME/mame/icons~@ | |
1317 | covers_directory $HOME/mame/covers~@ | |
1318 | ui_path $HOME/.mame/ui~%"))) | |
1319 | #t))) | |
1320 | (add-after 'install 'install-desktop-file | |
1321 | (lambda* (#:key outputs #:allow-other-keys) | |
1322 | (let* ((out (assoc-ref outputs "out")) | |
1323 | (desktop (string-append out "/share/applications")) | |
1324 | (executable (string-append out "/bin/mame"))) | |
1325 | (mkdir-p desktop) | |
1326 | (with-output-to-file (string-append desktop "/mame.desktop") | |
1327 | (lambda _ | |
1328 | (format #t | |
1329 | "[Desktop Entry]~@ | |
1330 | Name=mame~@ | |
1331 | Comment=Multi-purpose emulation framework~@ | |
1332 | Exec=~a~@ | |
1333 | TryExec=~@*~a~@ | |
1334 | Terminal=false~@ | |
1335 | Type=Application~@ | |
1336 | Categories=Game;Emulator;~@ | |
1337 | Keywords=Game;Emulator;Arcade;~%" | |
1338 | executable))) | |
1339 | #t)))))) | |
1340 | (native-inputs | |
1341 | `(("pkg-config" ,pkg-config) | |
03370346 NG |
1342 | ("sphinx" ,python-sphinx) |
1343 | ("sphinxcontrib-svg2pdfconverter" ,python-sphinxcontrib-svg2pdfconverter) | |
c8b2fd28 NG |
1344 | ("texinfo" ,texinfo))) |
1345 | (inputs | |
1346 | `(("alsa-lib" ,alsa-lib) | |
1347 | ("asio" ,asio) | |
1348 | ("expat" ,expat) | |
1349 | ("flac" ,flac) | |
1350 | ("fontconfig" ,fontconfig) | |
1351 | ("glm" ,glm) | |
1352 | ("libjpeg" ,libjpeg-8) ;jpeg_read_header argument error in libjpeg-9 | |
9f0650df | 1353 | ("libxi" ,libxi) |
c8b2fd28 NG |
1354 | ("libxinerama" ,libxinerama) |
1355 | ("lua" ,lua) | |
1356 | ("portaudio" ,portaudio) | |
1357 | ("portmidi" ,portmidi) | |
63247277 | 1358 | ("pugixml" ,pugixml) |
c8b2fd28 NG |
1359 | ("python-wrapper" ,python-wrapper) |
1360 | ("qtbase" ,qtbase) | |
1361 | ("rapidjson" ,rapidjson) | |
1362 | ("sdl" ,(sdl-union (list sdl2 sdl2-ttf))) | |
1363 | ("sqlite" ,sqlite) | |
1364 | ("utf8proc" ,utf8proc) | |
1365 | ("zlib" ,zlib))) | |
1366 | (home-page "http://mamedev.org/") | |
1367 | (synopsis "Multi-purpose emulation framework") | |
1368 | (description "MAME's purpose is to preserve decades of software | |
1369 | history. As electronic technology continues to rush forward, MAME | |
1370 | prevents this important @emph{vintage} software from being lost and | |
1371 | forgotten. This is achieved by documenting the hardware and how it | |
1372 | functions. The source code to MAME serves as this documentation.") | |
1373 | ;; The MAME project as a whole is distributed under the terms of GPL2+. | |
1374 | ;; However, over 90% of the files are under Expat license. Also, artwork, | |
1375 | ;; keymaps, languages and samples are under CC0. | |
1376 | (license (list license:gpl2+ license:expat license:cc0)))) |