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