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