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