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> |
d63e0ee7 | 9 | ;;; Copyright © 2017, 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
2d4b2488 | 10 | ;;; Copyright © 2017, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
478040d4 | 11 | ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com> |
1403e1f7 | 12 | ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz> |
f6a0be2f | 13 | ;;; Copyright © 2019 David Wilson <david@daviwil.com> |
c9e7acbf | 14 | ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> |
e5f9ec8b RH |
15 | ;;; |
16 | ;;; This file is part of GNU Guix. | |
17 | ;;; | |
18 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
19 | ;;; under the terms of the GNU General Public License as published by | |
20 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
21 | ;;; your option) any later version. | |
22 | ;;; | |
23 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
24 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
25 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
26 | ;;; GNU General Public License for more details. | |
27 | ;;; | |
28 | ;;; You should have received a copy of the GNU General Public License | |
29 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
30 | ||
31 | (define-module (gnu packages emulators) | |
1403e1f7 | 32 | #:use-module (ice-9 match) |
e5f9ec8b RH |
33 | #:use-module ((guix licenses) #:prefix license:) |
34 | #:use-module (guix packages) | |
9af704c5 | 35 | #:use-module (guix download) |
e5f9ec8b | 36 | #:use-module (guix git-download) |
9af704c5 RH |
37 | #:use-module (guix svn-download) |
38 | #:use-module (gnu packages) | |
39 | #:use-module (gnu packages algebra) | |
4c40ed9d | 40 | #:use-module (gnu packages assembly) |
e5f9ec8b | 41 | #:use-module (gnu packages audio) |
9af704c5 RH |
42 | #:use-module (gnu packages autotools) |
43 | #:use-module (gnu packages base) | |
44 | #:use-module (gnu packages boost) | |
45 | #:use-module (gnu packages backup) | |
1403e1f7 | 46 | #:use-module (gnu packages cdrom) |
e5f9ec8b RH |
47 | #:use-module (gnu packages compression) |
48 | #:use-module (gnu packages curl) | |
e8ffa382 | 49 | #:use-module (gnu packages elf) |
e5f9ec8b RH |
50 | #:use-module (gnu packages fonts) |
51 | #:use-module (gnu packages fontutils) | |
9af704c5 | 52 | #:use-module (gnu packages freedesktop) |
e5f9ec8b | 53 | #:use-module (gnu packages game-development) |
cbf58afa | 54 | #:use-module (gnu packages gcc) |
e5f9ec8b RH |
55 | #:use-module (gnu packages gettext) |
56 | #:use-module (gnu packages gl) | |
57 | #:use-module (gnu packages glib) | |
58 | #:use-module (gnu packages gtk) | |
59 | #:use-module (gnu packages image) | |
9af704c5 RH |
60 | #:use-module (gnu packages imagemagick) |
61 | #:use-module (gnu packages libedit) | |
e5f9ec8b RH |
62 | #:use-module (gnu packages libusb) |
63 | #:use-module (gnu packages linux) | |
c8b2fd28 NG |
64 | #:use-module (gnu packages lua) |
65 | #:use-module (gnu packages maths) | |
4c40ed9d | 66 | #:use-module (gnu packages mp3) |
c8b2fd28 | 67 | #:use-module (gnu packages music) |
9af704c5 | 68 | #:use-module (gnu packages ncurses) |
c8b2fd28 | 69 | #:use-module (gnu packages networking) |
e5f9ec8b RH |
70 | #:use-module (gnu packages pkg-config) |
71 | #:use-module (gnu packages pulseaudio) | |
9af704c5 | 72 | #:use-module (gnu packages python) |
e5f9ec8b RH |
73 | #:use-module (gnu packages qt) |
74 | #:use-module (gnu packages sdl) | |
9d0c291e | 75 | #:use-module (gnu packages sphinx) |
cd0322a3 | 76 | #:use-module (gnu packages sqlite) |
c8b2fd28 NG |
77 | #:use-module (gnu packages texinfo) |
78 | #:use-module (gnu packages textutils) | |
e5f9ec8b RH |
79 | #:use-module (gnu packages tls) |
80 | #:use-module (gnu packages upnp) | |
81 | #:use-module (gnu packages video) | |
9af704c5 | 82 | #:use-module (gnu packages vulkan) |
e5f9ec8b | 83 | #:use-module (gnu packages wxwidgets) |
9af704c5 | 84 | #:use-module (gnu packages xdisorg) |
e5f9ec8b | 85 | #:use-module (gnu packages xiph) |
9af704c5 | 86 | #:use-module (gnu packages xml) |
e5f9ec8b | 87 | #:use-module (gnu packages xorg) |
c8b2fd28 | 88 | #:use-module (gnu packages web) |
9af704c5 | 89 | #:use-module (guix build-system cmake) |
f6a0be2f | 90 | #:use-module (guix build-system glib-or-gtk) |
9af704c5 RH |
91 | #:use-module (guix build-system gnu)) |
92 | ||
93 | (define-public desmume | |
94 | (package | |
95 | (name "desmume") | |
96 | (version "0.9.11") | |
97 | (source | |
98 | (origin | |
99 | (method url-fetch) | |
100 | (uri (string-append | |
101 | "mirror://sourceforge/desmume/desmume/" | |
102 | version "/desmume-" version ".tar.gz")) | |
103 | (sha256 | |
104 | (base32 | |
f2674207 | 105 | "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs")) |
106 | (patches (search-patches "desmume-gcc6-fixes.patch" | |
107 | "desmume-gcc7-fixes.patch")))) | |
9af704c5 RH |
108 | (build-system gnu-build-system) |
109 | (arguments | |
110 | ;; Enable support for WiFi and microphone. | |
111 | `(#:configure-flags '("--enable-wifi" | |
112 | "--enable-openal"))) | |
113 | (native-inputs | |
114 | `(("pkg-config" ,pkg-config) | |
115 | ("intltool" ,intltool))) | |
116 | (inputs | |
117 | `(("zlib" ,zlib) | |
118 | ("sdl" ,sdl) | |
119 | ("glib" ,glib) | |
120 | ("gtk+" ,gtk+-2) | |
121 | ("glu" ,glu))) | |
122 | (home-page "http://desmume.org/") | |
123 | (synopsis "Nintendo DS emulator") | |
124 | (description | |
125 | "DeSmuME is an emulator for the Nintendo DS handheld gaming console.") | |
126 | (license license:gpl2))) | |
e5f9ec8b RH |
127 | |
128 | ;; Building from recent Git because the official 5.0 release no longer builds. | |
129 | (define-public dolphin-emu | |
2b332c51 RH |
130 | (let ((commit "a9745400ec5cea7e55d94955afbdc44d1a4982d1") |
131 | (revision "7")) | |
e5f9ec8b RH |
132 | (package |
133 | (name "dolphin-emu") | |
134 | (version (git-version "5.0" revision commit)) | |
135 | (source | |
136 | (origin | |
137 | (method git-fetch) | |
138 | (uri (git-reference | |
139 | (url "https://github.com/dolphin-emu/dolphin.git") | |
140 | (commit commit))) | |
141 | (file-name (git-file-name name version)) | |
85280804 EF |
142 | (modules '((guix build utils))) |
143 | (snippet | |
144 | '(begin | |
145 | ;; Remove external stuff we don't need. | |
146 | (for-each (lambda (dir) | |
147 | (delete-file-recursively | |
148 | (string-append "Externals/" dir))) | |
fab8d41c | 149 | '("LZO" "OpenAL" "Qt" "SFML" "curl" "ffmpeg" |
85280804 | 150 | "gettext" "hidapi" "libpng" "libusb" "mbedtls" |
2b332c51 | 151 | "miniupnpc" "MoltenVK" "zlib")) |
85280804 EF |
152 | ;; Clean up source. |
153 | (for-each delete-file (find-files "." ".*\\.(bin|dsy|exe|jar|rar)$")) | |
154 | #t)) | |
e5f9ec8b RH |
155 | (sha256 |
156 | (base32 | |
2b332c51 | 157 | "0ic08ii4vlqlmk2wkfc99jiy6nji2wfq56r7slj23wgvhznnaabk")))) |
e5f9ec8b RH |
158 | (build-system cmake-build-system) |
159 | (arguments | |
160 | '(#:tests? #f | |
e5f9ec8b RH |
161 | #:phases |
162 | (modify-phases %standard-phases | |
6bebad77 | 163 | (add-before 'configure 'generate-fonts&hardcore-libvulkan-path |
e5f9ec8b RH |
164 | (lambda* (#:key inputs outputs #:allow-other-keys) |
165 | (let ((fontfile | |
166 | (string-append (assoc-ref inputs "font-wqy-microhei") | |
6bebad77 RH |
167 | "/share/fonts/truetype/wqy-microhei.ttc")) |
168 | (libvulkan | |
e6fcf903 | 169 | (string-append (assoc-ref inputs "vulkan-loader") |
6bebad77 | 170 | "/lib/libvulkan.so"))) |
e5f9ec8b | 171 | (chdir "docs") |
0fe041bd | 172 | (invoke "bash" "-c" "g++ -O2 $(freetype-config \ |
e5f9ec8b RH |
173 | --cflags --libs) gc-font-tool.cpp -o gc-font-tool") |
174 | (invoke "./gc-font-tool" "a" fontfile "font_western.bin") | |
175 | (invoke "./gc-font-tool" "s" fontfile "font_japanese.bin") | |
176 | (copy-file "font_japanese.bin" "../Data/Sys/GC/font_japanese.bin") | |
177 | (copy-file "font_western.bin" "../Data/Sys/GC/font_western.bin") | |
178 | (chdir "..") | |
6bebad77 | 179 | (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp" |
2b332c51 RH |
180 | (("\"vulkan\", 1") (string-append "\"vulkan\""))) |
181 | (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp" | |
182 | (("\"vulkan\"") (string-append "\"" libvulkan "\""))) | |
183 | (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp" | |
184 | (("Common::DynamicLibrary::GetVersionedFilename") "")) | |
e5f9ec8b RH |
185 | #t)))) |
186 | ||
fab8d41c RH |
187 | ;; The FindGTK2 cmake script only checks hardcoded directories for |
188 | ;; glib/gtk headers. | |
189 | ||
e5f9ec8b | 190 | #:configure-flags |
fab8d41c | 191 | (list (string-append "-DX11_INCLUDE_DIR=" |
e5f9ec8b RH |
192 | (assoc-ref %build-inputs "libx11") |
193 | "/include") | |
194 | (string-append "-DX11_LIBRARIES=" | |
195 | (assoc-ref %build-inputs "libx11") | |
196 | "/lib/libX11.so") | |
197 | "-DX11_FOUND=1"))) | |
e5f9ec8b RH |
198 | (native-inputs |
199 | `(("pkg-config" ,pkg-config) | |
200 | ("gettext" ,gnu-gettext))) | |
201 | (inputs | |
202 | `(("alsa-lib" ,alsa-lib) | |
203 | ("ao" ,ao) | |
204 | ("bluez" ,bluez) | |
205 | ("curl" ,curl) | |
206 | ("eudev" ,eudev) | |
e7039f10 | 207 | ("ffmpeg" ,ffmpeg) |
e5f9ec8b RH |
208 | ("font-wqy-microhei" ,font-wqy-microhei) |
209 | ("freetype" ,freetype) | |
210 | ("glew" ,glew) | |
211 | ("glib" ,glib) | |
212 | ("glu" ,glu) | |
213 | ("gtk+" ,gtk+-2) | |
214 | ("hidapi" ,hidapi) | |
215 | ("libevdev" ,libevdev) | |
216 | ("libpng" ,libpng) | |
217 | ("libusb" ,libusb) | |
218 | ("libx11" ,libx11) | |
219 | ("libxi" ,libxi) | |
220 | ("libxrandr" ,libxrandr) | |
221 | ("lzo" ,lzo) | |
222 | ("mbedtls-apache" ,mbedtls-apache) | |
223 | ("mesa" ,mesa) | |
224 | ("miniupnpc" ,miniupnpc) | |
225 | ("openal" ,openal) | |
fab8d41c | 226 | ("pugixml" ,pugixml) |
e5f9ec8b RH |
227 | ("pulseaudio" ,pulseaudio) |
228 | ("qtbase" ,qtbase) | |
229 | ("sdl2" ,sdl2) | |
230 | ("sfml" ,sfml) | |
231 | ("soil" ,soil) | |
232 | ("soundtouch" ,soundtouch) | |
e6fcf903 | 233 | ("vulkan-loader" ,vulkan-loader) |
e5f9ec8b RH |
234 | ("zlib" ,zlib))) |
235 | (home-page "https://dolphin-emu.org/") | |
236 | (synopsis "Nintendo Wii and GameCube emulator") | |
237 | (description | |
238 | "Dolphin is an emulator for two Nintendo video game consoles: the | |
239 | GameCube and the Wii. It provides compatibility with all PC controllers, | |
240 | turbo speed, networked multiplayer, and graphical enhancements.") | |
e89bfc2d | 241 | (supported-systems '("x86_64-linux" "aarch64-linux")) |
e5f9ec8b RH |
242 | ; dolphin/Data/Sys/GC/font_*.bin: Licensed under ASL2.0. |
243 | (license (list license:gpl2+ license:asl2.0 license:fdl1.2+))))) | |
9af704c5 RH |
244 | |
245 | (define-public dosbox | |
246 | (package | |
247 | (name "dosbox") | |
b09e4960 | 248 | (version "0.74-3") |
9af704c5 | 249 | (source (origin |
478040d4 RH |
250 | (method url-fetch) |
251 | (uri (string-append "https://sourceforge.net/projects/dosbox" | |
252 | "/files/dosbox/" version "/dosbox-" | |
253 | version ".tar.gz/download")) | |
254 | (file-name (string-append name "-" version ".tar.gz")) | |
9af704c5 RH |
255 | (sha256 |
256 | (base32 | |
b09e4960 | 257 | "02i648i50dwicv1vaql15rccv4g8h5blf5g6inv67lrfxpbkvlf0")))) |
9af704c5 | 258 | (build-system gnu-build-system) |
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 | |
4530fe8e JK |
279 | ;; No release for a long time, new commits fix build issues |
280 | (let ((commit "9cc42adff67946175d2b7e25c6ae69cc374e98a0") | |
281 | (revision "1")) | |
9af704c5 RH |
282 | (package |
283 | (name "emulation-station") | |
4530fe8e | 284 | (version (git-version "2.0.1" revision commit)) |
9af704c5 RH |
285 | (source (origin |
286 | (method git-fetch) ; no tarball available | |
287 | (uri (git-reference | |
288 | (url "https://github.com/Aloshi/EmulationStation.git") | |
289 | (commit commit))) ; no version tag | |
4530fe8e | 290 | (file-name (git-file-name name version)) |
9af704c5 RH |
291 | (sha256 |
292 | (base32 | |
4530fe8e | 293 | "1cva0ns650v17lfn8in095zci6lc43d23f1x3mlzc41qfqa6mbd1")))) |
9af704c5 RH |
294 | (build-system cmake-build-system) |
295 | (arguments | |
296 | '(#:tests? #f)) ; no tests | |
297 | (inputs | |
298 | `(("alsa-lib" ,alsa-lib) | |
299 | ("boost" ,boost) | |
300 | ("curl" ,curl) | |
301 | ("eigin" ,eigen) | |
302 | ("freeimage" ,freeimage) | |
303 | ("freetype" ,freetype) | |
304 | ("mesa" ,mesa) | |
305 | ("sdl2" ,sdl2))) | |
306 | (synopsis "Video game console emulator front-end") | |
307 | (description "EmulationStation provides a graphical front-end to a large | |
308 | number of video game console emulators. It features an interface that is | |
309 | usable with any game controller that has at least 4 buttons, theming support, | |
310 | and a game metadata scraper.") | |
311 | (home-page "http://www.emulationstation.org") | |
312 | (license license:expat)))) | |
313 | ||
c66f3b3b JK |
314 | ;; Note: higan v107 has been released, but as explained by the dialog that |
315 | ;; appears after starting the new version, it's an experimental release. The | |
316 | ;; author recommends v106 for general use. | |
317 | ;; | |
318 | ;; When updating to v107 (or probably beyond), sdl will have to be replaced | |
319 | ;; with sdl2, and libxrandr will need to be added to inputs. The patch | |
320 | ;; `higan-remove-march-native-flag.patch' will not be necessary, since the flag | |
321 | ;; is now being added only for `platform=local', which is not the default. | |
9af704c5 RH |
322 | (define-public higan |
323 | (package | |
324 | (name "higan") | |
325 | (version "106") | |
326 | (source | |
327 | (origin | |
f3686999 JK |
328 | (method git-fetch) |
329 | (uri (git-reference | |
330 | (url "https://github.com/byuu/higan/") | |
331 | (commit (string-append "v" version)))) | |
332 | (file-name (git-file-name name version)) | |
9af704c5 | 333 | (sha256 |
f3686999 | 334 | (base32 "1mxivf8124vz4hl0b0xa1yqv0z9m3i12v9psmbpqkprrbq0wbgn1")) |
9af704c5 RH |
335 | (patches (search-patches "higan-remove-march-native-flag.patch")))) |
336 | (build-system gnu-build-system) | |
337 | (native-inputs | |
338 | `(("pkg-config" ,pkg-config))) | |
339 | (inputs | |
340 | `(("alsa-lib" ,alsa-lib) | |
341 | ("ao" ,ao) | |
342 | ("eudev" ,eudev) | |
343 | ("gtk+" ,gtk+-2) | |
344 | ("gtksourceview-2" ,gtksourceview-2) | |
345 | ("libxv" ,libxv) | |
346 | ("mesa" ,mesa) | |
347 | ("openal" ,openal) | |
348 | ("pulseaudio" ,pulseaudio) | |
349 | ("sdl" ,sdl))) | |
350 | (arguments | |
351 | '(#:phases | |
352 | (let ((build-phase (assoc-ref %standard-phases 'build)) | |
353 | (install-phase (assoc-ref %standard-phases 'install))) | |
354 | (modify-phases %standard-phases | |
355 | ;; The higan build system has no configure phase. | |
356 | (delete 'configure) | |
357 | (add-before 'build 'chdir-to-higan | |
358 | (lambda _ | |
6d34d3f8 JK |
359 | (chdir "higan") |
360 | #t)) | |
9af704c5 RH |
361 | (add-before 'install 'create-/share/applications |
362 | (lambda* (#:key outputs #:allow-other-keys) | |
363 | (let ((out (assoc-ref outputs "out"))) | |
364 | ;; It seems the author forgot to do this in the Makefile. | |
6d34d3f8 JK |
365 | (mkdir-p (string-append out "/share/applications")) |
366 | #t))) | |
9af704c5 RH |
367 | (add-after 'install 'chdir-to-icarus |
368 | (lambda _ | |
6d34d3f8 JK |
369 | (chdir "../icarus") |
370 | #t)) | |
9af704c5 RH |
371 | (add-after 'chdir-to-icarus 'build-icarus build-phase) |
372 | (add-after 'build-icarus 'install-icarus install-phase) | |
373 | (add-after 'install-icarus 'wrap-higan-executable | |
374 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
375 | (let* ((out (assoc-ref outputs "out")) | |
376 | (bin (string-append out "/bin")) | |
377 | (higan (string-append bin "/higan")) | |
378 | (higan-original (string-append higan "-original")) | |
379 | (bash (string-append (assoc-ref inputs "bash") | |
380 | "/bin/bash")) | |
381 | (coreutils (assoc-ref inputs "coreutils")) | |
382 | (mkdir (string-append coreutils "/bin/mkdir")) | |
383 | (cp (string-append coreutils "/bin/cp")) | |
384 | (cp-r (string-append cp " -r --no-preserve=mode"))) | |
385 | ;; First, have the executable make sure ~/.local/share/higan | |
386 | ;; contains up to date files. Higan insists on looking there | |
387 | ;; for these data files. | |
388 | (rename-file higan higan-original) | |
389 | (with-output-to-file higan | |
390 | (lambda () | |
391 | (display | |
392 | (string-append | |
393 | "#!" bash "\n" | |
394 | ;; higan doesn't respect $XDG_DATA_HOME | |
395 | mkdir " -p ~/.local/share\n" | |
396 | cp-r " " out "/share/higan ~/.local/share\n" | |
397 | "exec " higan-original)))) | |
398 | (chmod higan #o555) | |
399 | ;; Second, make sure higan will find icarus in PATH. | |
400 | (wrap-program higan | |
6d34d3f8 JK |
401 | `("PATH" ":" prefix (,bin))) |
402 | #t))))) | |
9af704c5 RH |
403 | #:make-flags |
404 | (list "compiler=g++" | |
405 | (string-append "prefix=" (assoc-ref %outputs "out"))) | |
406 | ;; There is no test suite. | |
407 | #:tests? #f)) | |
72314cc3 | 408 | (home-page "https://byuu.org/higan") |
9af704c5 RH |
409 | (synopsis "Nintendo multi-system emulator") |
410 | (description | |
411 | "higan (formerly bsnes) is an emulator for multiple Nintendo video game | |
412 | consoles, including the Nintendo Entertainment System (NES/Famicom), Super | |
413 | Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy | |
414 | Color (GBC), and Game Boy Advance (GBA). It also supports the subsystems | |
415 | Super Game Boy, BS-X Satellaview, and Sufami Turbo.") | |
416 | ;; As noted in these files among more: | |
417 | ;; - icarus/icarus.cpp | |
418 | ;; - higan/emulator/emulator.hpp | |
419 | (license license:gpl3))) | |
420 | ||
421 | (define-public mgba | |
422 | (package | |
423 | (name "mgba") | |
1d0e8ec1 | 424 | (version "0.8.1") |
d63e0ee7 NG |
425 | (source |
426 | (origin | |
427 | (method git-fetch) | |
428 | (uri (git-reference | |
429 | (url "https://github.com/mgba-emu/mgba.git") | |
430 | (commit version))) | |
431 | (file-name (git-file-name name version)) | |
432 | (sha256 | |
1d0e8ec1 | 433 | (base32 "1if82mfaak3696w5d5yshynpzywrxgvg3ifdfi2rwlpvq1gpd429")) |
d63e0ee7 NG |
434 | (modules '((guix build utils))) |
435 | (snippet | |
436 | ;; Make sure we don't use the bundled software. | |
437 | '(begin | |
438 | (for-each | |
439 | (lambda (subdir) | |
440 | (let ((lib-subdir (string-append "src/third-party/" subdir))) | |
441 | (delete-file-recursively lib-subdir))) | |
442 | '("libpng" "lzma" "sqlite3" "zlib")) | |
443 | #t)))) | |
9af704c5 RH |
444 | (build-system cmake-build-system) |
445 | (arguments | |
446 | `(#:tests? #f ;no "test" target | |
447 | #:configure-flags | |
448 | (list "-DUSE_LZMA=OFF" ;do not use bundled LZMA | |
6ea1c6fc | 449 | "-DUSE_LIBZIP=OFF"))) ;use "zlib" instead |
1d0e8ec1 JK |
450 | (native-inputs `(("pkg-config" ,pkg-config) |
451 | ("qttools" ,qttools))) | |
9af704c5 RH |
452 | (inputs `(("ffmpeg" ,ffmpeg) |
453 | ("imagemagick" ,imagemagick) | |
454 | ("libedit" ,libedit) | |
6dcac920 | 455 | ("libelf" ,libelf) |
9af704c5 RH |
456 | ("libepoxy" ,libepoxy) |
457 | ("libpng" ,libpng) | |
458 | ("mesa" ,mesa) | |
459 | ("minizip" ,minizip) | |
460 | ("ncurses" ,ncurses) | |
461 | ("qtbase" ,qtbase) | |
462 | ("qtmultimedia" ,qtmultimedia) | |
9af704c5 RH |
463 | ("sdl2" ,sdl2) |
464 | ("sqlite" ,sqlite) | |
465 | ("zlib" ,zlib))) | |
466 | (home-page "https://mgba.io") | |
467 | (synopsis "Game Boy Advance emulator") | |
468 | (description | |
469 | "mGBA is an emulator for running Game Boy Advance games. It aims to be | |
470 | faster and more accurate than many existing Game Boy Advance emulators, as | |
471 | well as adding features that other emulators lack. It also supports Game Boy | |
472 | and Game Boy Color games.") | |
1d0e8ec1 JK |
473 | ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+, "inih.c" is |
474 | ;; BSD-3, and "discord-rpc" is Expat. | |
475 | (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3 license:expat)))) | |
9af704c5 | 476 | |
c9e7acbf JK |
477 | (define-public sameboy |
478 | (package | |
479 | (name "sameboy") | |
480 | (version "0.12.3") | |
481 | (source | |
482 | (origin | |
483 | (method git-fetch) | |
484 | (uri (git-reference | |
485 | (url "https://github.com/LIJI32/SameBoy.git") | |
486 | (commit (string-append "v" version)))) | |
487 | (file-name (git-file-name name version)) | |
488 | (sha256 | |
489 | (base32 "0m5rv2x8qck1kr43xq186pp4kaiay7gd1x775n9qrljcd7z4x6fs")))) | |
490 | (build-system gnu-build-system) | |
491 | (native-inputs | |
492 | `(("rgbds" ,rgbds) | |
493 | ("gcc" ,gcc-9) | |
494 | ("pkg-config" ,pkg-config))) | |
495 | (inputs | |
496 | `(("sdl2" ,sdl2))) | |
497 | (arguments | |
498 | `(#:tests? #f ; There are no tests | |
499 | #:make-flags `("CC=gcc" "CONF=release" | |
500 | ,(string-append "DATA_DIR=" | |
501 | (assoc-ref %outputs "out") | |
502 | "/share/sameboy/")) | |
503 | #:phases | |
504 | (modify-phases %standard-phases | |
505 | (delete 'configure) | |
506 | (replace 'install | |
507 | (lambda* (#:key outputs #:allow-other-keys) | |
508 | (let* ((out (assoc-ref outputs "out")) | |
509 | (bin (string-append out "/bin")) | |
510 | (data (string-append out "/share/sameboy/"))) | |
511 | (with-directory-excursion "build/bin/SDL" | |
512 | (install-file "sameboy" bin) | |
513 | (delete-file "sameboy") | |
514 | (copy-recursively "." data)))))))) | |
515 | (home-page "https://sameboy.github.io/") | |
516 | (synopsis "Accurate Game Boy, Game Boy Color and Super Game Boy emulator") | |
517 | (description "SameBoy is a user friendly Game Boy, Game Boy Color | |
518 | and Super Game Boy emulator. SameBoy is accurate and includes a wide | |
519 | range of debugging features. It has all the features one would expect | |
520 | from an emulator---from save states to scaling filters.") | |
521 | (license license:expat))) | |
522 | ||
9af704c5 RH |
523 | (define-public mupen64plus-core |
524 | (package | |
525 | (name "mupen64plus-core") | |
526 | (version "2.5") | |
527 | (source | |
528 | (origin | |
10bcd4bb TGR |
529 | (method git-fetch) |
530 | (uri (git-reference | |
531 | (url "https://github.com/mupen64plus/mupen64plus-core.git") | |
532 | (commit version))) | |
533 | (file-name (git-file-name name version)) | |
9af704c5 | 534 | (sha256 |
10bcd4bb | 535 | (base32 "116fndl6652zrp1r6ag4xv3dzp1x52mlvadj8xwflq07fd5rhri1")))) |
9af704c5 RH |
536 | (build-system gnu-build-system) |
537 | (native-inputs | |
538 | `(("pkg-config" ,pkg-config) | |
539 | ("which" ,which))) | |
540 | (inputs | |
541 | `(("freetype" ,freetype) | |
542 | ("glu" ,glu) | |
543 | ("libpng" ,libpng) | |
544 | ("mesa" ,mesa) | |
545 | ("sdl2" ,sdl2) | |
546 | ("zlib" ,zlib))) | |
547 | (arguments | |
548 | '(#:phases | |
549 | (modify-phases %standard-phases | |
550 | ;; The mupen64plus build system has no configure phase. | |
551 | (delete 'configure) | |
552 | ;; Makefile is in a subdirectory. | |
553 | (add-before | |
eaa2b35c | 554 | 'build 'chdir-to-project-directory |
9af704c5 | 555 | (lambda _ |
eaa2b35c TGR |
556 | (chdir "projects/unix") |
557 | #t))) | |
9af704c5 RH |
558 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
559 | (list "all" (string-append "PREFIX=" out))) | |
560 | ;; There are no tests. | |
561 | #:tests? #f)) | |
562 | ;; As per the Makefile (in projects/unix/Makefile): | |
563 | (supported-systems '("i686-linux" "x86_64-linux")) | |
eaa2b35c | 564 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
565 | (synopsis "Nintendo 64 emulator core library") |
566 | (description | |
567 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
568 | which is capable of accurately playing many games. This package contains the | |
569 | core library.") | |
570 | (license license:gpl2+))) | |
571 | ||
572 | (define-public mupen64plus-audio-sdl | |
573 | (package | |
574 | (name "mupen64plus-audio-sdl") | |
575 | (version "2.5") | |
576 | (source | |
577 | (origin | |
8c6d45cb TGR |
578 | (method git-fetch) |
579 | (uri (git-reference | |
580 | (url "https://github.com/mupen64plus/mupen64plus-audio-sdl.git") | |
581 | (commit version))) | |
582 | (file-name (git-file-name name version)) | |
9af704c5 | 583 | (sha256 |
8c6d45cb | 584 | (base32 "0z19amfg9vr2pqjjri1ipc7hs681fzjcnb0f9y7bjhp5n8d7p6bb")))) |
9af704c5 RH |
585 | (build-system gnu-build-system) |
586 | (native-inputs | |
587 | `(("pkg-config" ,pkg-config) | |
588 | ("which" ,which))) | |
589 | (inputs | |
590 | `(("mupen64plus-core" ,mupen64plus-core) | |
591 | ("sdl2" ,sdl2))) | |
592 | (arguments | |
593 | '(#:phases | |
594 | (modify-phases %standard-phases | |
595 | ;; The mupen64plus build system has no configure phase. | |
596 | (delete 'configure) | |
597 | ;; Makefile is in a subdirectory. | |
598 | (add-before | |
599 | 'build 'cd-to-project-dir | |
600 | (lambda _ | |
601 | (chdir "projects/unix")))) | |
602 | #:make-flags | |
603 | (let ((out (assoc-ref %outputs "out")) | |
604 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
605 | (list "all" | |
606 | (string-append "PREFIX=" out) | |
607 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
608 | ;; There are no tests. | |
609 | #:tests? #f)) | |
cf5e9465 | 610 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
611 | (synopsis "Mupen64Plus SDL input plugin") |
612 | (description | |
613 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
614 | which is capable of accurately playing many games. This package contains the | |
615 | SDL audio plugin.") | |
616 | (license license:gpl2+))) | |
617 | ||
618 | (define-public mupen64plus-input-sdl | |
619 | (package | |
620 | (name "mupen64plus-input-sdl") | |
621 | (version "2.5") | |
622 | (source | |
623 | (origin | |
ef5ef8f5 TGR |
624 | (method git-fetch) |
625 | (uri (git-reference | |
626 | (url "https://github.com/mupen64plus/mupen64plus-input-sdl.git") | |
627 | (commit version))) | |
628 | (file-name (git-file-name name version)) | |
9af704c5 | 629 | (sha256 |
ef5ef8f5 | 630 | (base32 "1dyazfbdjycdfslq8jixqiqhziw0rlkvach2r9dz91229jmkyc9c")))) |
9af704c5 RH |
631 | (build-system gnu-build-system) |
632 | (native-inputs | |
633 | `(("which" ,which))) | |
634 | (inputs | |
635 | `(("mupen64plus-core" ,mupen64plus-core) | |
636 | ("sdl2" ,sdl2))) | |
637 | (arguments | |
638 | '(#:phases | |
639 | (modify-phases %standard-phases | |
640 | ;; The mupen64plus build system has no configure phase. | |
641 | (delete 'configure) | |
642 | ;; Makefile is in a subdirectory. | |
643 | (add-before | |
644 | 'build 'cd-to-project-dir | |
645 | (lambda _ | |
646 | (chdir "projects/unix")))) | |
647 | #:make-flags | |
648 | (let ((out (assoc-ref %outputs "out")) | |
649 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
650 | (list "all" | |
651 | (string-append "PREFIX=" out) | |
652 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
653 | ;; There are no tests. | |
654 | #:tests? #f)) | |
d738ce16 | 655 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
656 | (synopsis "Mupen64Plus SDL input plugin") |
657 | (description | |
658 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
659 | which is capable of accurately playing many games. This package contains the | |
660 | SDL input plugin.") | |
661 | (license license:gpl2+))) | |
662 | ||
663 | (define-public mupen64plus-rsp-hle | |
664 | (package | |
665 | (name "mupen64plus-rsp-hle") | |
666 | (version "2.5") | |
667 | (source | |
668 | (origin | |
c4f0c8ba TGR |
669 | (method git-fetch) |
670 | (uri (git-reference | |
671 | (url "https://github.com/mupen64plus/mupen64plus-rsp-hle.git") | |
672 | (commit version))) | |
673 | (file-name (git-file-name name version)) | |
9af704c5 | 674 | (sha256 |
c4f0c8ba | 675 | (base32 "0pi31qzjjp7aypdvvnz6ms18g09c4gqzxi6328zj8sji94b75gf0")))) |
9af704c5 RH |
676 | (build-system gnu-build-system) |
677 | (inputs | |
678 | `(("mupen64plus-core" ,mupen64plus-core))) | |
679 | (arguments | |
680 | '(#:phases | |
681 | (modify-phases %standard-phases | |
682 | ;; The mupen64plus build system has no configure phase. | |
683 | (delete 'configure) | |
684 | ;; Makefile is in a subdirectory. | |
685 | (add-before | |
686 | 'build 'cd-to-project-dir | |
687 | (lambda _ | |
688 | (chdir "projects/unix")))) | |
689 | #:make-flags | |
690 | (let ((out (assoc-ref %outputs "out")) | |
691 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
692 | (list "all" | |
693 | (string-append "PREFIX=" out) | |
694 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
695 | ;; There are no tests. | |
696 | #:tests? #f)) | |
cf396ea5 | 697 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
698 | (synopsis "Mupen64Plus SDL input plugin") |
699 | (description | |
700 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
701 | which is capable of accurately playing many games. This package contains the | |
702 | high-level emulation (HLE) RSP processor plugin.") | |
703 | (license license:gpl2+))) | |
704 | ||
705 | (define-public mupen64plus-rsp-z64 | |
706 | (package | |
707 | (name "mupen64plus-rsp-z64") | |
708 | (version "2.0.0") | |
709 | (source | |
710 | (origin | |
052650c8 TGR |
711 | (method git-fetch) |
712 | (uri (git-reference | |
713 | (url "https://github.com/mupen64plus/mupen64plus-rsp-z64.git") | |
714 | (commit version))) | |
715 | (file-name (git-file-name name version)) | |
9af704c5 | 716 | (sha256 |
052650c8 | 717 | (base32 "0nfyjns9k8xbg3aqs7593nfaxvlj72h3l8h467442xlk8ajfcylx")))) |
9af704c5 RH |
718 | (build-system gnu-build-system) |
719 | (inputs | |
720 | `(("mupen64plus-core" ,mupen64plus-core))) | |
721 | (arguments | |
722 | '(#:phases | |
723 | (modify-phases %standard-phases | |
724 | ;; The mupen64plus build system has no configure phase. | |
725 | (delete 'configure) | |
726 | ;; Makefile is in a subdirectory. | |
727 | (add-before | |
728 | 'build 'cd-to-project-dir | |
729 | (lambda _ | |
730 | (chdir "projects/unix")))) | |
731 | #:make-flags | |
732 | (let ((out (assoc-ref %outputs "out")) | |
733 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
734 | (list "all" | |
735 | (string-append "PREFIX=" out) | |
736 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
737 | ;; There are no tests. | |
738 | #:tests? #f)) | |
24b03073 | 739 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
740 | (synopsis "Mupen64Plus SDL input plugin") |
741 | (description | |
742 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
743 | which is capable of accurately playing many games. This package contains the | |
744 | Z64 RSP processor plugin.") | |
745 | (license license:gpl2+))) | |
746 | ||
747 | (define-public mupen64plus-video-arachnoid | |
748 | (package | |
749 | (name "mupen64plus-video-arachnoid") | |
750 | (version "2.0.0") | |
751 | (source | |
752 | (origin | |
2074c8bf TGR |
753 | (method git-fetch) |
754 | (uri (git-reference | |
755 | (url "https://github.com/mupen64plus/mupen64plus-video-arachnoid.git") | |
756 | (commit version))) | |
757 | (file-name (git-file-name name version)) | |
9af704c5 | 758 | (sha256 |
2074c8bf | 759 | (base32 "1v9fqwpb6pawr8z5cm2ki7bqkks4iyr5c4jy4v5khj6h8zcv55gc")))) |
9af704c5 RH |
760 | (build-system gnu-build-system) |
761 | (native-inputs | |
762 | `(("pkg-config" ,pkg-config) | |
763 | ("which" ,which))) | |
764 | (inputs | |
765 | `(("mesa" ,mesa) | |
766 | ("mupen64plus-core" ,mupen64plus-core))) | |
767 | (arguments | |
768 | '(#:phases | |
769 | (modify-phases %standard-phases | |
770 | ;; The mupen64plus build system has no configure phase. | |
771 | (delete 'configure) | |
772 | ;; Makefile is in a subdirectory. | |
773 | (add-before | |
774 | 'build 'cd-to-project-dir | |
775 | (lambda _ | |
776 | (chdir "projects/unix")))) | |
777 | #:make-flags | |
778 | (let ((out (assoc-ref %outputs "out")) | |
779 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
780 | (list "all" | |
781 | (string-append "PREFIX=" out) | |
782 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
783 | ;; There are no tests. | |
784 | #:tests? #f)) | |
5daa2019 | 785 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
786 | (synopsis "Mupen64Plus Rice Video plugin") |
787 | (description | |
788 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
789 | which is capable of accurately playing many games. This package contains the | |
790 | Arachnoid video plugin.") | |
791 | (license license:gpl2+))) | |
792 | ||
793 | (define-public mupen64plus-video-glide64 | |
794 | (package | |
795 | (name "mupen64plus-video-glide64") | |
796 | (version "2.0.0") | |
797 | (source | |
798 | (origin | |
62536186 TGR |
799 | (method git-fetch) |
800 | (uri (git-reference | |
801 | (url "https://github.com/mupen64plus/mupen64plus-video-glide64.git") | |
802 | (commit version))) | |
803 | (file-name (git-file-name name version)) | |
9af704c5 | 804 | (sha256 |
62536186 | 805 | (base32 "0qn5za7g7796kh2ag3xpmhbqg0yf71g9liz6ks0rha8pz73lgs01")))) |
9af704c5 RH |
806 | (build-system gnu-build-system) |
807 | (native-inputs | |
808 | `(("pkg-config" ,pkg-config) | |
809 | ("which" ,which))) | |
810 | (inputs | |
811 | `(("mesa" ,mesa) | |
812 | ("mupen64plus-core" ,mupen64plus-core) | |
813 | ("sdl2" ,sdl2))) | |
814 | (arguments | |
815 | '(#:phases | |
816 | (modify-phases %standard-phases | |
817 | ;; The mupen64plus build system has no configure phase. | |
818 | (delete 'configure) | |
819 | ;; Makefile is in a subdirectory. | |
820 | (add-before | |
821 | 'build 'cd-to-project-dir | |
822 | (lambda _ | |
823 | (chdir "projects/unix"))) | |
824 | ;; XXX Should be unnecessary with the next release. | |
825 | (add-before | |
826 | 'build 'use-sdl2 | |
827 | (lambda _ | |
828 | (substitute* "Makefile" | |
829 | (("SDL_CONFIG = (.*)sdl-config" all prefix) | |
830 | (string-append "SDL_CONFIG = " prefix "sdl2-config")))))) | |
831 | #:make-flags | |
832 | (let ((out (assoc-ref %outputs "out")) | |
833 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
834 | (list "all" | |
835 | (string-append "PREFIX=" out) | |
836 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
837 | ;; There are no tests. | |
838 | #:tests? #f)) | |
d1e63866 | 839 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
840 | (synopsis "Mupen64Plus Rice Video plugin") |
841 | (description | |
842 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
843 | which is capable of accurately playing many games. This package contains the | |
844 | Glide64 video plugin.") | |
845 | (license license:gpl2+))) | |
846 | ||
847 | (define-public mupen64plus-video-glide64mk2 | |
848 | (package | |
849 | (name "mupen64plus-video-glide64mk2") | |
850 | (version "2.5") | |
851 | (source | |
852 | (origin | |
e5e7a167 TGR |
853 | (method git-fetch) |
854 | (uri (git-reference | |
855 | (url "https://github.com/mupen64plus/mupen64plus-video-glide64mk2.git") | |
856 | (commit version))) | |
857 | (file-name (git-file-name name version)) | |
9af704c5 | 858 | (sha256 |
e5e7a167 | 859 | (base32 "08pm28a36dpr0cvr8pzw0n5ksdazp7jqvlmqfy2lwb4dm0cwhkqd")))) |
9af704c5 RH |
860 | (build-system gnu-build-system) |
861 | (native-inputs | |
862 | `(("pkg-config" ,pkg-config) | |
863 | ("which" ,which))) | |
864 | (inputs | |
865 | `(("boost" ,boost) | |
866 | ("libpng" ,libpng) | |
867 | ("mesa" ,mesa) | |
868 | ("mupen64plus-core" ,mupen64plus-core) | |
869 | ("sdl2" ,sdl2) | |
870 | ("zlib" ,zlib))) | |
871 | (arguments | |
872 | '(#:phases | |
873 | (modify-phases %standard-phases | |
874 | ;; The mupen64plus build system has no configure phase. | |
875 | (delete 'configure) | |
876 | ;; Makefile is in a subdirectory. | |
877 | (add-before | |
878 | 'build 'cd-to-project-dir | |
879 | (lambda _ | |
880 | (chdir "projects/unix")))) | |
881 | #:make-flags | |
882 | (let ((out (assoc-ref %outputs "out")) | |
883 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
884 | (list "all" | |
885 | (string-append "PREFIX=" out) | |
886 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
887 | ;; There are no tests. | |
888 | #:tests? #f)) | |
84532c2b | 889 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
890 | (synopsis "Mupen64Plus Rice Video plugin") |
891 | (description | |
892 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
893 | which is capable of accurately playing many games. This package contains the | |
894 | Glide64MK2 video plugin.") | |
895 | (license license:gpl2+))) | |
896 | ||
897 | (define-public mupen64plus-video-rice | |
898 | (package | |
899 | (name "mupen64plus-video-rice") | |
900 | (version "2.5") | |
901 | (source | |
902 | (origin | |
d42d0a0b TGR |
903 | (method git-fetch) |
904 | (uri (git-reference | |
905 | (url "https://github.com/mupen64plus/mupen64plus-video-rice.git") | |
906 | (commit version))) | |
907 | (file-name (git-file-name name version)) | |
9af704c5 | 908 | (sha256 |
d42d0a0b | 909 | (base32 "0rpmbcq67gsj5h5jjis146378qc1mskskvx20y1ikx59yhbamh13")))) |
9af704c5 RH |
910 | (build-system gnu-build-system) |
911 | (native-inputs | |
912 | `(("pkg-config" ,pkg-config) | |
913 | ("which" ,which))) | |
914 | (inputs | |
915 | `(("libpng" ,libpng) | |
916 | ("mesa" ,mesa) | |
917 | ("mupen64plus-core" ,mupen64plus-core) | |
918 | ("sdl2" ,sdl2))) | |
919 | (arguments | |
920 | '(#:phases | |
921 | (modify-phases %standard-phases | |
922 | ;; The mupen64plus build system has no configure phase. | |
923 | (delete 'configure) | |
924 | ;; Makefile is in a subdirectory. | |
925 | (add-before | |
926 | 'build 'cd-to-project-dir | |
927 | (lambda _ | |
928 | (chdir "projects/unix")))) | |
929 | #:make-flags | |
930 | (let ((out (assoc-ref %outputs "out")) | |
931 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
932 | (list "all" | |
933 | (string-append "PREFIX=" out) | |
934 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
935 | ;; There are no tests. | |
936 | #:tests? #f)) | |
b21acd21 | 937 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
938 | (synopsis "Mupen64Plus Rice Video plugin") |
939 | (description | |
940 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
941 | which is capable of accurately playing many games. This package contains the | |
942 | Rice Video plugin.") | |
943 | (license license:gpl2+))) | |
944 | ||
945 | (define-public mupen64plus-video-z64 | |
946 | (package | |
947 | (name "mupen64plus-video-z64") | |
948 | (version "2.0.0") | |
949 | (source | |
950 | (origin | |
85baeb20 TGR |
951 | (method git-fetch) |
952 | (uri (git-reference | |
953 | (url "https://github.com/mupen64plus/mupen64plus-video-z64.git") | |
954 | (commit version))) | |
955 | (file-name (git-file-name name version)) | |
9af704c5 | 956 | (sha256 |
85baeb20 | 957 | (base32 "04qa2fdd6dakpk2v0d4l80xh9b4h8gm71g80c0wyyxdhmhwk1r9c")) |
fdb61400 | 958 | (patches (search-patches "mupen64plus-video-z64-glew-correct-path.patch")))) |
9af704c5 RH |
959 | (build-system gnu-build-system) |
960 | (native-inputs | |
961 | `(("pkg-config" ,pkg-config) | |
962 | ("which" ,which))) | |
963 | (inputs | |
964 | `(("glew" ,glew) | |
965 | ("mupen64plus-core" ,mupen64plus-core) | |
966 | ("sdl2" ,sdl2))) | |
967 | (arguments | |
968 | '(#:phases | |
969 | (modify-phases %standard-phases | |
970 | ;; The mupen64plus build system has no configure phase. | |
971 | (delete 'configure) | |
972 | ;; Makefile is in a subdirectory. | |
973 | (add-before | |
974 | 'build 'cd-to-project-dir | |
975 | (lambda _ | |
976 | (chdir "projects/unix"))) | |
977 | ;; XXX Should be unnecessary with the next release. | |
978 | (add-before | |
979 | 'build 'use-sdl2 | |
980 | (lambda _ | |
981 | (substitute* "Makefile" | |
982 | (("SDL_CONFIG = (.*)sdl-config" all prefix) | |
983 | (string-append "SDL_CONFIG = " prefix "sdl2-config")))))) | |
984 | #:make-flags | |
985 | (let ((out (assoc-ref %outputs "out")) | |
986 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
987 | (list "all" | |
988 | (string-append "PREFIX=" out) | |
989 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
990 | ;; There are no tests. | |
991 | #:tests? #f)) | |
26daadb9 | 992 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
993 | (synopsis "Mupen64Plus Z64 video plugin") |
994 | (description | |
995 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
996 | which is capable of accurately playing many games. This package contains the | |
997 | Z64 video plugin.") | |
998 | (license license:gpl2+))) | |
999 | ||
1000 | (define-public mupen64plus-ui-console | |
1001 | (package | |
1002 | (name "mupen64plus-ui-console") | |
1003 | (version "2.5") | |
1004 | (source | |
1005 | (origin | |
225157a0 TGR |
1006 | (method git-fetch) |
1007 | (uri (git-reference | |
1008 | (url "https://github.com/mupen64plus/mupen64plus-ui-console.git") | |
1009 | (commit version))) | |
1010 | (file-name (git-file-name name version)) | |
9af704c5 | 1011 | (sha256 |
225157a0 | 1012 | (base32 "0vrf98qa6a0y3647kslsv644fag233dxh5dcr1yncjiiwickcr5a")) |
9af704c5 RH |
1013 | (patches (search-patches "mupen64plus-ui-console-notice.patch")))) |
1014 | (build-system gnu-build-system) | |
1015 | (native-inputs | |
1016 | `(("pkg-config" ,pkg-config) | |
1017 | ("which" ,which))) | |
1018 | (inputs | |
1019 | `(("sdl2" ,sdl2))) | |
1020 | ;; Mupen64Plus supports a single data directory and a single plugin | |
1021 | ;; directory in its configuration, yet we need data and plugin files from | |
1022 | ;; a variety of packages. The best way to deal with this is to install | |
1023 | ;; all packages from which data and plugin files are needed into one's | |
1024 | ;; profile, and point the configuration there. Hence, propagate the most | |
1025 | ;; important packages here to save the user from the bother. The patch | |
1026 | ;; mupen64plus-ui-console-notice also gives users instructions on what | |
1027 | ;; they need to do in order to point the configuration to their profile. | |
1028 | (propagated-inputs | |
1029 | `(("mupen64plus-core" ,mupen64plus-core) | |
1030 | ("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl) | |
1031 | ("mupen64plus-input-sdl" ,mupen64plus-input-sdl) | |
1032 | ("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle) | |
1033 | ("mupen64plus-video-glide64" ,mupen64plus-video-glide64) | |
1034 | ("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2) | |
1035 | ("mupen64plus-video-rice" ,mupen64plus-video-rice))) | |
1036 | (arguments | |
1037 | '(#:phases | |
1038 | (modify-phases %standard-phases | |
1039 | ;; The mupen64plus build system has no configure phase. | |
1040 | (delete 'configure) | |
1041 | ;; Makefile is in a subdirectory. | |
1042 | (add-before | |
1043 | 'build 'cd-to-project-dir | |
1044 | (lambda _ | |
1045 | (chdir "projects/unix")))) | |
1046 | #:make-flags | |
1047 | (let ((out (assoc-ref %outputs "out")) | |
1048 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
1049 | (list "all" | |
1050 | (string-append "PREFIX=" out) | |
1051 | (string-append "APIDIR=" m64p "/include/mupen64plus") | |
1052 | ;; Trailing slash matters here. | |
1053 | (string-append "COREDIR=" m64p "/lib/"))) | |
1054 | ;; There are no tests. | |
1055 | #:tests? #f)) | |
e8079ba4 | 1056 | (home-page "https://www.mupen64plus.org/") |
ff452bea | 1057 | (synopsis "Mupen64Plus command line user interface") |
9af704c5 RH |
1058 | (description |
1059 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
1060 | which is capable of accurately playing many games. This package contains the | |
1061 | command line user interface. Installing this package is the easiest way | |
1062 | towards a working Mupen64Plus for casual users.") | |
1063 | (license license:gpl2+))) | |
1064 | ||
1065 | (define-public nestopia-ue | |
1066 | (package | |
1067 | (name "nestopia-ue") | |
9d39c300 | 1068 | (version "1.48") |
3e461b71 TGR |
1069 | (source |
1070 | (origin | |
1071 | (method git-fetch) | |
1072 | (uri (git-reference | |
1073 | (url "https://github.com/rdanbrook/nestopia.git") | |
1074 | (commit version))) | |
1075 | (file-name (git-file-name name version)) | |
1076 | (sha256 | |
1077 | (base32 "19c8vx5yxbysl0sszk5blfngwacshdgwbf44g1qaxvq8ywiyxmb4")) | |
1078 | (modules '((guix build utils))) | |
1079 | (snippet | |
1080 | '(begin | |
1081 | ;; We don't need libretro for the GNU/Linux build. | |
1082 | (delete-file-recursively "libretro") | |
1083 | #t)))) | |
9d39c300 | 1084 | (build-system cmake-build-system) |
9af704c5 RH |
1085 | (native-inputs |
1086 | `(("pkg-config" ,pkg-config))) | |
1087 | (inputs | |
1088 | `(("ao" ,ao) | |
9af704c5 RH |
1089 | ("gtk+" ,gtk+) |
1090 | ("libarchive" ,libarchive) | |
9d39c300 | 1091 | ("libepoxy" ,libepoxy) |
9af704c5 RH |
1092 | ("sdl2" ,sdl2) |
1093 | ("zlib" ,zlib))) | |
1094 | (arguments | |
1095 | '(#:phases | |
1096 | (modify-phases %standard-phases | |
9d39c300 KK |
1097 | ;; This fixes the file chooser crash that happens with GTK 3. |
1098 | (add-after 'install 'wrap-program | |
1099 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1100 | (let* ((out (assoc-ref outputs "out")) | |
1101 | (nestopia (string-append out "/bin/nestopia")) | |
1102 | (gtk (assoc-ref inputs "gtk+")) | |
1103 | (gtk-share (string-append gtk "/share"))) | |
1104 | (wrap-program nestopia | |
1105 | `("XDG_DATA_DIRS" ":" prefix (,gtk-share))))))) | |
9af704c5 RH |
1106 | ;; There are no tests. |
1107 | #:tests? #f)) | |
1108 | (home-page "http://0ldsk00l.ca/nestopia/") | |
1109 | (synopsis "Nintendo Entertainment System (NES/Famicom) emulator") | |
1110 | (description | |
1111 | "Nestopia UE (Undead Edition) is a fork of the Nintendo Entertainment | |
1112 | System (NES/Famicom) emulator Nestopia, with enhancements from members of the | |
1113 | emulation community. It provides highly accurate emulation.") | |
1114 | (license license:gpl2+))) | |
1115 | ||
1116 | (define-public retroarch | |
1117 | (package | |
1118 | (name "retroarch") | |
bd671624 | 1119 | (version "1.8.1") |
9af704c5 RH |
1120 | (source |
1121 | (origin | |
1fc346de TGR |
1122 | (method git-fetch) |
1123 | (uri (git-reference | |
1124 | (url "https://github.com/libretro/RetroArch.git") | |
1125 | (commit (string-append "v" version)))) | |
1126 | (file-name (git-file-name name version)) | |
9af704c5 | 1127 | (sha256 |
77549754 TGR |
1128 | (base32 "0y7rcpz7psf8k3agsrq277jdm651vbnn9xpqvmj2in1a786idya7")) |
1129 | (patches | |
1130 | (search-patches "retroarch-disable-online-updater.patch")) | |
1131 | (modules '((guix build utils))) | |
1132 | (snippet | |
1133 | '(begin | |
1134 | ;; Don't suggest using the Online Updater if available: it never | |
1135 | ;; is. This disables translation of this particular message. | |
1136 | (substitute* (find-files "menu/drivers" "\\.c$") | |
1137 | (("msg_hash_to_str\\(MSG_MISSING_ASSETS\\)") | |
1138 | "\"Warning: Missing assets, go get some\"")) | |
1139 | #t)))) | |
9af704c5 RH |
1140 | (build-system gnu-build-system) |
1141 | (arguments | |
f21967a4 | 1142 | `(#:tests? #f ; no tests |
9af704c5 RH |
1143 | #:phases |
1144 | (modify-phases %standard-phases | |
1145 | (replace 'configure | |
1146 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1147 | (let* ((out (assoc-ref outputs "out")) | |
1148 | (etc (string-append out "/etc")) | |
12a3abc6 RH |
1149 | (vulkan (assoc-ref inputs "vulkan-loader")) |
1150 | (wayland-protocols (assoc-ref inputs "wayland-protocols"))) | |
77549754 | 1151 | ;; Hard-code some store file names. |
9af704c5 RH |
1152 | (substitute* "gfx/common/vulkan_common.c" |
1153 | (("libvulkan.so") (string-append vulkan "/lib/libvulkan.so"))) | |
12a3abc6 RH |
1154 | (substitute* "gfx/common/wayland/generate_wayland_protos.sh" |
1155 | (("/usr/local/share/wayland-protocols") | |
1156 | (string-append wayland-protocols "/share/wayland-protocols"))) | |
9af704c5 RH |
1157 | (substitute* "qb/qb.libs.sh" |
1158 | (("/bin/true") (which "true"))) | |
77549754 | 1159 | |
fade67ab EF |
1160 | ;; Use shared zlib. |
1161 | (substitute* '("libretro-common/file/archive_file_zlib.c" | |
e85bb00c | 1162 | "libretro-common/streams/trans_stream_zlib.c") |
fade67ab | 1163 | (("<compat/zlib.h>") "<zlib.h>")) |
77549754 | 1164 | |
9af704c5 RH |
1165 | ;; The configure script does not yet accept the extra arguments |
1166 | ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase. | |
f21967a4 EF |
1167 | (invoke |
1168 | "./configure" | |
1169 | ,@(if (string-prefix? "armhf" (or (%current-target-system) | |
1170 | (%current-system))) | |
1171 | '("--enable-neon" "--enable-floathard") | |
1172 | '()) | |
1173 | (string-append "--prefix=" out) | |
73dd0654 TGR |
1174 | (string-append "--global-config-dir=" etc) |
1175 | "--disable-builtinminiupnpc"))))))) | |
9af704c5 RH |
1176 | (inputs |
1177 | `(("alsa-lib" ,alsa-lib) | |
1178 | ("ffmpeg" ,ffmpeg) | |
1179 | ("freetype" ,freetype) | |
1180 | ("libxinerama" ,libxinerama) | |
1181 | ("libxkbcommon" ,libxkbcommon) | |
1182 | ("libxml2" ,libxml2) | |
45267af1 | 1183 | ("libxrandr" ,libxrandr) |
9af704c5 RH |
1184 | ("libxv" ,libxv) |
1185 | ("mesa" ,mesa) | |
73dd0654 | 1186 | ("miniupnpc" ,miniupnpc) |
9af704c5 RH |
1187 | ("openal" ,openal) |
1188 | ("pulseaudio" ,pulseaudio) | |
1189 | ("python" ,python) | |
76b7d8fd | 1190 | ("qtbase" ,qtbase) |
9af704c5 RH |
1191 | ("sdl" ,sdl2) |
1192 | ("udev" ,eudev) | |
e6fcf903 | 1193 | ("vulkan-loader" ,vulkan-loader) |
c695fb76 | 1194 | ("wayland" ,wayland) |
9af704c5 RH |
1195 | ("zlib" ,zlib))) |
1196 | (native-inputs | |
1197 | `(("pkg-config" ,pkg-config) | |
12a3abc6 | 1198 | ("wayland-protocols" ,wayland-protocols) |
9af704c5 RH |
1199 | ("which" ,which))) |
1200 | (home-page "https://www.libretro.com/") | |
1201 | (synopsis "Reference frontend for the libretro API") | |
1202 | (description | |
1203 | "Libretro is a simple but powerful development interface that allows for | |
1204 | the easy creation of emulators, games and multimedia applications that can plug | |
1205 | straight into any libretro-compatible frontend. RetroArch is the official | |
1206 | reference frontend for the libretro API, currently used by most as a modular | |
1207 | multi-system game/emulator system.") | |
1208 | (license license:gpl3+))) | |
4c40ed9d NG |
1209 | |
1210 | (define-public scummvm | |
1211 | (package | |
1212 | (name "scummvm") | |
2d4b2488 | 1213 | (version "2.1.1") |
4c40ed9d NG |
1214 | (source |
1215 | (origin | |
1216 | (method url-fetch) | |
1217 | (uri (string-append "http://www.scummvm.org/frs/scummvm/" version | |
1218 | "/scummvm-" version ".tar.xz")) | |
1219 | (sha256 | |
2d4b2488 | 1220 | (base32 "1a6waf1ybp91nwva8g650cljlfb1di4l0jv13vg6yfgkas9pclsp")))) |
4c40ed9d NG |
1221 | (build-system gnu-build-system) |
1222 | (arguments | |
6177b14b | 1223 | `(#:tests? #f ;require "git" |
4c40ed9d NG |
1224 | #:configure-flags (list "--enable-release") ;for optimizations |
1225 | #:phases | |
1226 | (modify-phases %standard-phases | |
161b297b NG |
1227 | (add-after 'unpack 'fix-build |
1228 | ;; XXX: The following works around a build failure introduced when | |
1229 | ;; Fluidsynth was updated to version 2.1. It has been applied | |
1230 | ;; upstream as 68758a879e0c8ecc0d40962516d4e808aa4e15e5 and can be | |
2d4b2488 | 1231 | ;; removed once this commit makes it into a release. |
161b297b NG |
1232 | (lambda _ |
1233 | (substitute* "audio/softsynth/fluidsynth.cpp" | |
1234 | (("#include <fluidsynth.h>") "") | |
1235 | (("#include \"common/scummsys.h\"") "#include \"config.h\"") | |
1236 | (("#include \"common/config-manager.h\"" line) | |
1237 | (string-append "#include <fluidsynth.h>\n" | |
1238 | "#include \"common/scummsys.h\"\n" | |
1239 | line))) | |
1240 | #t)) | |
4c40ed9d NG |
1241 | (replace 'configure |
1242 | ;; configure does not work followed by both "SHELL=..." and | |
1243 | ;; "CONFIG_SHELL=..."; set environment variables instead | |
1244 | (lambda* (#:key outputs configure-flags #:allow-other-keys) | |
1245 | (let* ((out (assoc-ref outputs "out")) | |
1246 | (bash (which "bash")) | |
1247 | (flags `(,(string-append "--prefix=" out) | |
1248 | ,@configure-flags))) | |
1249 | (setenv "SHELL" bash) | |
1250 | (setenv "CONFIG_SHELL" bash) | |
1251 | (apply invoke "./configure" flags))))))) | |
1252 | (native-inputs | |
64e9d128 NG |
1253 | `(("nasm" ,nasm) |
1254 | ("pkg-config" ,pkg-config))) | |
4c40ed9d NG |
1255 | (inputs |
1256 | `(("alsa-lib" ,alsa-lib) | |
1257 | ("faad2" ,faad2) | |
1258 | ("fluidsynth" ,fluidsynth) | |
1259 | ("freetype" ,freetype) | |
6177b14b | 1260 | ("liba52" ,liba52) |
4c40ed9d NG |
1261 | ("libflac" ,flac) |
1262 | ("libjpeg-turbo" ,libjpeg-turbo) | |
1263 | ("libmad" ,libmad) | |
1264 | ("libmpeg2" ,libmpeg2) | |
1265 | ("libogg" ,libogg) | |
1266 | ("libpng" ,libpng) | |
1267 | ("libtheora" ,libtheora) | |
1268 | ("libvorbis" ,libvorbis) | |
6177b14b | 1269 | ("sdl2" ,(sdl-union (list sdl2 sdl2-net))) |
4c40ed9d NG |
1270 | ("zlib" ,zlib))) |
1271 | (home-page "https://www.scummvm.org/") | |
1272 | (synopsis "Engine for several graphical adventure games") | |
1273 | (description "ScummVM is a program which allows you to run certain | |
1274 | classic graphical point-and-click adventure games, provided you | |
1275 | already have their data files. The clever part about this: ScummVM | |
1276 | just replaces the executables shipped with the games, allowing you to | |
1277 | play them on systems for which they were never designed!") | |
1278 | (license license:gpl2+))) | |
c8b2fd28 NG |
1279 | |
1280 | (define-public mame | |
1281 | (package | |
1282 | (name "mame") | |
bc490e07 | 1283 | (version "0.219") |
c8b2fd28 NG |
1284 | (source |
1285 | (origin | |
1286 | (method git-fetch) | |
1287 | (uri (git-reference | |
1288 | (url "https://github.com/mamedev/mame.git") | |
1289 | (commit (apply string-append "mame" (string-split version #\.))))) | |
1290 | (file-name (git-file-name name version)) | |
1291 | (sha256 | |
bc490e07 | 1292 | (base32 "0s3nhkfa5c17ar1lzgvm20ndqain9llgqkab0ji5ycv2c85f06fl")) |
c8b2fd28 NG |
1293 | (modules '((guix build utils))) |
1294 | (snippet | |
1295 | ;; Remove bundled libraries. | |
1296 | '(begin | |
1297 | (with-directory-excursion "3rdparty" | |
1298 | (for-each delete-file-recursively | |
1299 | '("asio" "expat" "glm" "libflac" "libjpeg" "lua" | |
1300 | "portaudio" "portmidi" "pugixml" "rapidjson" "SDL2" | |
1301 | "SDL2-override" "sqlite3" "utf8proc" "zlib"))) | |
1302 | #t)))) | |
1303 | (build-system gnu-build-system) | |
1304 | (arguments | |
1305 | `(#:make-flags | |
1306 | (cons* | |
430e1528 NG |
1307 | ;; A 'strict-overflow' error pops up on i686 so disable '-Werror'. |
1308 | "NOWERROR=1" | |
c8b2fd28 NG |
1309 | (string-append "QT_HOME=" (assoc-ref %build-inputs "qtbase")) |
1310 | (string-append "SDL_INI_PATH=" | |
1311 | (assoc-ref %outputs "out") | |
1312 | "/share/mame/ini") | |
1313 | (map (lambda (lib) | |
1314 | (string-append "USE_SYSTEM_LIB_" (string-upcase lib) "=1")) | |
1315 | '("asio" "expat" "flac" "glm" "jpeg" "lua" "portaudio" "portmidi" | |
1316 | "pugixml" "rapidjson" "sqlite3" "utf8proc" "zlib"))) | |
1317 | #:tests? #f ;no test in regular release | |
1318 | #:phases | |
1319 | (modify-phases %standard-phases | |
1320 | (delete 'configure) | |
1321 | (add-after 'build 'build-documentation | |
1322 | (lambda _ (invoke "make" "-C" "docs" "man" "info"))) | |
1323 | (replace 'install | |
1324 | ;; Upstream does not provide an installation phase. | |
1325 | (lambda* (#:key outputs #:allow-other-keys) | |
1326 | (let* ((out (assoc-ref outputs "out")) | |
1327 | (share (string-append out "/share/mame"))) | |
1328 | ;; Install data. | |
1329 | (for-each (lambda (dir) | |
1330 | (copy-recursively dir (string-append share "/" dir))) | |
1331 | '("artwork" "bgfx" "ctrlr" "hash" "ini" "language" | |
1332 | "plugins" "samples")) | |
1333 | (let ((keymaps (string-append share "/keymaps"))) | |
1334 | (for-each (lambda (file) (install-file file keymaps)) | |
1335 | (find-files "keymaps" ".*LINUX\\.map"))) | |
1336 | (let ((fonts (string-append share "/fonts"))) | |
1337 | (install-file "uismall.bdf" fonts)) | |
6921e95a EF |
1338 | (when (file-exists? "mame64") |
1339 | (rename-file "mame64" "mame")) | |
c8b2fd28 NG |
1340 | (install-file "mame" (string-append out "/bin"))) |
1341 | #t)) | |
1342 | (add-after 'install 'install-documentation | |
1343 | (lambda* (#:key outputs #:allow-other-keys) | |
1344 | (let* ((out (assoc-ref outputs "out")) | |
1345 | (man (string-append out "/share/man/man1")) | |
1346 | (info (string-append out "/share/info"))) | |
1347 | (install-file "docs/build/man/MAME.1" man) | |
1348 | (install-file "docs/build/texinfo/MAME.info" info)) | |
1349 | #t)) | |
1350 | (add-after 'install 'install-ini-file | |
1351 | ;; Generate an ini file so as to set some directories (e.g., roms) | |
1352 | ;; to a writable location, i.e., "$HOME/.mame/" and "$HOME/mame/". | |
1353 | ;; | |
1354 | ;; XXX: We need to insert absolute references to the store. It can | |
1355 | ;; be an issue if they leak into user's home directory, e.g., with | |
1356 | ;; "mame -createconfig" and the package is later GC'ed. | |
1357 | (lambda* (#:key outputs #:allow-other-keys) | |
1358 | (let* ((out (assoc-ref outputs "out")) | |
1359 | (share (string-append out "/share/mame")) | |
1360 | (ini (string-append share "/ini"))) | |
1361 | (with-output-to-file (string-append ini "/mame.ini") | |
1362 | (lambda _ | |
1363 | (format #t | |
1364 | "inipath $HOME/.mame;~a/ini~@ | |
1365 | homepath $HOME/mame~@ | |
1366 | rompath $HOME/mame/roms~@ | |
1367 | samplepath $HOME/mame/samples;~a/samples~@ | |
1368 | cheatpath $HOME/mame/cheat~@ | |
1369 | artpath $HOME/mame/artwork;~a/artwork~@ | |
1370 | crosshairpath $HOME/mame/crosshair~@ | |
1371 | snapshot_directory $HOME/mame/snapshots~@ | |
1372 | hashpath ~a/hash~@ | |
1373 | fontpath $HOME/mame/fonts;~a/fonts~@ | |
1374 | ctrlrpath $HOME/mame/ctrlr;~a/ctrlr~@ | |
1375 | bgfx_path ~a/bgfx~@ | |
1376 | pluginspath $HOME/mame/plugins;~a/plugins~@ | |
1377 | languagepath ~a/language~@ | |
1378 | cfg_directory $HOME/.mame/cfg~@ | |
1379 | nvram_directory $HOME/.mame/nvram~@ | |
1380 | input_directory $HOME/.mame/inp~@ | |
1381 | state_directory $HOME/.mame/sta~@ | |
1382 | diff_directory $HOME/.mame/diff~@ | |
1383 | comment_directory $HOME/.mame/comments~%" | |
1384 | share share share share share share share share | |
1385 | share))) | |
1386 | (with-output-to-file (string-append ini "/ui.ini") | |
1387 | (lambda _ | |
1388 | (format #t | |
1389 | "historypath $HOME/mame/history~@ | |
1390 | categorypath $HOME/mame/folders~@ | |
1391 | cabinets_directory $HOME/mame/cabinets~@ | |
1392 | cpanels_directory $HOME/mame/cpanel~@ | |
1393 | pcbs_directory $HOME/mame/pcb~@ | |
1394 | flyers_directory $HOME/mame/flyers~@ | |
1395 | titles_directory $HOME/mame/titles~@ | |
1396 | ends_directory $HOME/mame/ends~@ | |
1397 | marquees_directory $HOME/mame/marquees~@ | |
1398 | artwork_preview_directory $HOME/mame/artpreview~@ | |
1399 | bosses_directory $HOME/mame/bosses~@ | |
1400 | logos_directory $HOME/mame/logo~@ | |
1401 | scores_directory $HOME/mame/scores~@ | |
1402 | versus_directory $HOME/mame/versus~@ | |
1403 | gameover_directory $HOME/mame/gameover~@ | |
1404 | howto_directory $HOME/mame/howto~@ | |
1405 | select_directory $HOME/mame/select~@ | |
1406 | icons_directory $HOME/mame/icons~@ | |
1407 | covers_directory $HOME/mame/covers~@ | |
1408 | ui_path $HOME/.mame/ui~%"))) | |
1409 | #t))) | |
1410 | (add-after 'install 'install-desktop-file | |
1411 | (lambda* (#:key outputs #:allow-other-keys) | |
1412 | (let* ((out (assoc-ref outputs "out")) | |
1413 | (desktop (string-append out "/share/applications")) | |
1414 | (executable (string-append out "/bin/mame"))) | |
1415 | (mkdir-p desktop) | |
1416 | (with-output-to-file (string-append desktop "/mame.desktop") | |
1417 | (lambda _ | |
1418 | (format #t | |
1419 | "[Desktop Entry]~@ | |
1420 | Name=mame~@ | |
1421 | Comment=Multi-purpose emulation framework~@ | |
1422 | Exec=~a~@ | |
1423 | TryExec=~@*~a~@ | |
1424 | Terminal=false~@ | |
1425 | Type=Application~@ | |
1426 | Categories=Game;Emulator;~@ | |
1427 | Keywords=Game;Emulator;Arcade;~%" | |
1428 | executable))) | |
1429 | #t)))))) | |
1430 | (native-inputs | |
1431 | `(("pkg-config" ,pkg-config) | |
03370346 NG |
1432 | ("sphinx" ,python-sphinx) |
1433 | ("sphinxcontrib-svg2pdfconverter" ,python-sphinxcontrib-svg2pdfconverter) | |
c8b2fd28 NG |
1434 | ("texinfo" ,texinfo))) |
1435 | (inputs | |
1436 | `(("alsa-lib" ,alsa-lib) | |
1437 | ("asio" ,asio) | |
1438 | ("expat" ,expat) | |
1439 | ("flac" ,flac) | |
1440 | ("fontconfig" ,fontconfig) | |
1441 | ("glm" ,glm) | |
7b24b76b | 1442 | ("libjpeg" ,libjpeg-turbo) |
9f0650df | 1443 | ("libxi" ,libxi) |
c8b2fd28 NG |
1444 | ("libxinerama" ,libxinerama) |
1445 | ("lua" ,lua) | |
1446 | ("portaudio" ,portaudio) | |
1447 | ("portmidi" ,portmidi) | |
63247277 | 1448 | ("pugixml" ,pugixml) |
c8b2fd28 NG |
1449 | ("python-wrapper" ,python-wrapper) |
1450 | ("qtbase" ,qtbase) | |
1451 | ("rapidjson" ,rapidjson) | |
1452 | ("sdl" ,(sdl-union (list sdl2 sdl2-ttf))) | |
1453 | ("sqlite" ,sqlite) | |
1454 | ("utf8proc" ,utf8proc) | |
1455 | ("zlib" ,zlib))) | |
1456 | (home-page "http://mamedev.org/") | |
1457 | (synopsis "Multi-purpose emulation framework") | |
1458 | (description "MAME's purpose is to preserve decades of software | |
1459 | history. As electronic technology continues to rush forward, MAME | |
1460 | prevents this important @emph{vintage} software from being lost and | |
1461 | forgotten. This is achieved by documenting the hardware and how it | |
1462 | functions. The source code to MAME serves as this documentation.") | |
1463 | ;; The MAME project as a whole is distributed under the terms of GPL2+. | |
1464 | ;; However, over 90% of the files are under Expat license. Also, artwork, | |
1465 | ;; keymaps, languages and samples are under CC0. | |
1466 | (license (list license:gpl2+ license:expat license:cc0)))) | |
1403e1f7 | 1467 | |
08d34100 PN |
1468 | (define-public gnome-arcade |
1469 | (package | |
1470 | (name "gnome-arcade") | |
1471 | (version "0.218.2") | |
1472 | (source | |
1473 | (origin | |
1474 | (method git-fetch) | |
1475 | (uri (git-reference | |
1476 | (url "https://github.com/strippato/gnome-arcade") | |
1477 | (commit (string-append "v." version)))) | |
1478 | (file-name (git-file-name name version)) | |
1479 | (sha256 | |
1480 | (base32 | |
1481 | "1qc01a62p65qb6mwjfmxqsd6n3rglsfwrjhsp25nr7q54107n55l")))) | |
1482 | (build-system cmake-build-system) | |
1483 | (arguments | |
1484 | `(#:tests? #f ; No tests. | |
1485 | #:configure-flags (list | |
1486 | (string-append "-DMAME_BIN=\"" | |
1487 | (assoc-ref %build-inputs "mame") | |
1488 | "/bin/mame\"") | |
1489 | (string-append "-DAPP_RES=\"" | |
1490 | (assoc-ref %outputs "out") | |
1491 | "/share/gnome-arcade/\"")) | |
1492 | #:phases | |
1493 | (modify-phases %standard-phases | |
1494 | (add-before 'build 'fix-paths | |
1495 | (lambda* (#:key outputs #:allow-other-keys) | |
1496 | (let ((out (assoc-ref outputs "out"))) | |
1497 | (pk 'cwd (getcwd)) | |
1498 | (substitute* "../source/src/config.c" | |
1499 | (("/usr/share") (string-append out "/share")))) | |
1500 | #t)) | |
1501 | (replace 'install | |
1502 | (lambda* (#:key outputs #:allow-other-keys) | |
1503 | (let* ((out (assoc-ref outputs "out")) | |
1504 | (bin (string-append out "/bin")) | |
1505 | (rom (string-append out "/share/gnome-arcade/data/rom")) | |
1506 | (tile (string-append out "/share/gnome-arcade/data/tile"))) | |
1507 | (mkdir-p bin) | |
1508 | (install-file "../gnome-arcade" bin) | |
1509 | (copy-recursively "../source/res" | |
1510 | (string-append out "/share/gnome-arcade/res")) | |
1511 | (mkdir-p rom) | |
1512 | (install-file "../source/data/rom/ROM.TXT" rom) | |
1513 | (mkdir-p tile) | |
1514 | (install-file "../source/data/tile/TILE.TXT" tile)) | |
1515 | #t))))) | |
1516 | (native-inputs | |
1517 | `(("pkg-config" ,pkg-config))) | |
1518 | (inputs | |
1519 | `(("mame" ,mame) | |
1520 | ("gtk" ,gtk+) | |
1521 | ("libevdev" ,libevdev) | |
1522 | ("libvlc" ,vlc) | |
1523 | ("libarchive" ,libarchive))) | |
1524 | (home-page "https://github.com/strippato/gnome-arcade") | |
1525 | (synopsis "Minimal MAME frontend") | |
1526 | (description | |
1527 | "A minimal GTK+ frontend for MAME, the multi-purpose arcade and console | |
1528 | emulator.") | |
1529 | (license license:gpl3+))) | |
1530 | ||
1403e1f7 PN |
1531 | (define-public pcsxr |
1532 | ;; No release since 2017. | |
1533 | (let ((commit "6484236cb0281e8040ff6c8078c87899a3407534")) | |
1534 | (package | |
1535 | (name "pcsxr") | |
1536 | ;; Version is tagged here: https://github.com/frealgagu/PCSX-Reloaded | |
1537 | (version "1.9.95") | |
1538 | (source | |
1539 | (origin | |
1540 | (method git-fetch) | |
1541 | (uri (git-reference | |
1542 | (url "https://github.com/pcsxr/PCSX-Reloaded") | |
1543 | (commit commit))) | |
1544 | (sha256 | |
1545 | (base32 | |
1546 | "138mayp7zi9v4l3lm5f6xxkds619w1fgg769zm8s45c84jbz7dza")) | |
1547 | (file-name (git-file-name name commit)))) | |
1548 | (build-system cmake-build-system) | |
1549 | (arguments | |
1550 | `(#:tests? #f ;no "test" target | |
1551 | #:configure-flags | |
1552 | (list "-DSND_BACKEND=pulse" | |
1553 | "-DENABLE_CCDDA='ON'" | |
1554 | "-DUSE_LIBARCHIVE='ON'" | |
1555 | "-DUSE_LIBCDIO='ON'") | |
1556 | #:phases | |
1557 | (modify-phases %standard-phases | |
1558 | (add-after 'unpack 'cd-subdir | |
1ef71f52 | 1559 | (lambda _ (chdir "pcsxr") #t)) |
1403e1f7 PN |
1560 | (add-before 'configure 'fix-cdio-lookup |
1561 | (lambda* (#:key inputs #:allow-other-keys) | |
1562 | (substitute* "cmake/FindCdio.cmake" | |
1563 | (("/usr/include/cdio") | |
1ef71f52 KK |
1564 | (string-append (assoc-ref inputs "libcdio") "/include/cdio"))) |
1565 | #t)) | |
1566 | (add-after 'install 'wrap-program | |
1567 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1568 | (wrap-program (string-append (assoc-ref outputs "out") | |
1569 | "/bin/pcsxr") | |
1570 | ;; For GtkFileChooserDialog. | |
1571 | `("GSETTINGS_SCHEMA_DIR" = | |
1572 | (,(string-append (assoc-ref inputs "gtk+") | |
1573 | "/share/glib-2.0/schemas")))) | |
1574 | #t))))) | |
1403e1f7 PN |
1575 | (native-inputs |
1576 | `(("pkg-config" ,pkg-config) | |
1577 | ("intltool" ,intltool) | |
1578 | ("glib" ,glib "bin"))) | |
1579 | (inputs | |
1580 | `(("libcdio" ,libcdio) | |
1581 | ("sdl2" ,sdl2) | |
1582 | ("gtk+" ,gtk+) | |
1583 | ("ffmpeg" ,ffmpeg) | |
1584 | ("libxv" ,libxv) | |
1585 | ("libarchive" ,libarchive) | |
1586 | ("pulseaudio" ,pulseaudio))) | |
1587 | (home-page "https://archive.codeplex.com/?p=pcsxr") | |
1588 | (synopsis "PlayStation emulator") | |
1589 | (description | |
1590 | "A PlayStation emulator based on PCSX-df Project with bugfixes and | |
1591 | improvements.") | |
1592 | (license license:gpl2+)))) | |
f6a0be2f DW |
1593 | |
1594 | (define-public gens-gs | |
1595 | (package | |
1596 | (name "gens-gs") | |
1597 | (version "7") | |
1598 | (source | |
1599 | (origin | |
1600 | (method url-fetch) | |
1601 | (uri (string-append "https://retrocdn.net/images/6/6d/Gens-gs-r" | |
1602 | version ".tar.gz")) | |
1603 | (sha256 | |
1604 | (base32 | |
1605 | "1ha5s6d3y7s9aq9f4zmn9p88109c3mrj36z2w68jhiw5xrxws833")))) | |
1606 | (build-system glib-or-gtk-build-system) | |
1607 | (arguments | |
1608 | `(#:system "i686-linux" | |
1609 | #:phases | |
1610 | (modify-phases %standard-phases | |
1611 | (add-after 'unpack 'fix-CFLAGS | |
1612 | (lambda* _ | |
1613 | ;; Remove GTK API deprecation flags that cause build errors. | |
1614 | (substitute* "configure" | |
1615 | (("GTK_CFLAGS=\"\\$GTK_CFLAGS .*\"") "")) | |
1616 | #t))))) | |
1617 | (native-inputs | |
1618 | `(("pkg-config" ,pkg-config) | |
1619 | ("nasm" ,nasm))) | |
1620 | (inputs | |
1621 | `(("sdl" ,sdl) | |
1622 | ("gtk" ,gtk+-2))) | |
1623 | (home-page "https://segaretro.org/Gens/GS") | |
1624 | (synopsis "Emulator for Sega Genesis/Mega Drive systems") | |
1625 | (description | |
1626 | "Gens/GS is an emulator for the Mega Drive (also known as Sega Genesis), | |
1627 | derived from Gens. Project goals include clean source code, combined features | |
1628 | from various forks of Gens, and improved platform portability.") | |
1629 | (supported-systems '("i686-linux" "x86_64-linux")) | |
1630 | (license license:gpl2+))) |