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> | |
d4d0a155 | 4 | ;;; Copyright © 2015, 2016, 2021 Sou Bunnbu <iyzsong@member.fsf.org> |
9af704c5 RH |
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> | |
fad22f09 | 8 | ;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il> |
0b9e5d47 | 9 | ;;; Copyright © 2017-2022 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
c15fee61 | 10 | ;;; Copyright © 2017, 2020, 2021 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> |
45c58518 | 15 | ;;; Copyright © 2020 Christopher Howard <christopher@librehacker.com> |
1457f766 | 16 | ;;; Copyright © 2021 Felipe Balbi <balbi@kernel.org> |
4bf2637c | 17 | ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net> |
a1807928 | 18 | ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
bbdc4d73 | 19 | ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net> |
e5f9ec8b RH |
20 | ;;; |
21 | ;;; This file is part of GNU Guix. | |
22 | ;;; | |
23 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
24 | ;;; under the terms of the GNU General Public License as published by | |
25 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
26 | ;;; your option) any later version. | |
27 | ;;; | |
28 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
29 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
30 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
31 | ;;; GNU General Public License for more details. | |
32 | ;;; | |
33 | ;;; You should have received a copy of the GNU General Public License | |
34 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
35 | ||
36 | (define-module (gnu packages emulators) | |
1403e1f7 | 37 | #:use-module (ice-9 match) |
e5f9ec8b | 38 | #:use-module ((guix licenses) #:prefix license:) |
0f9bc3a8 | 39 | #:use-module (guix gexp) |
e5f9ec8b | 40 | #:use-module (guix packages) |
9af704c5 | 41 | #:use-module (guix download) |
e5f9ec8b | 42 | #:use-module (guix git-download) |
9af704c5 | 43 | #:use-module (guix svn-download) |
88f5665f | 44 | #:use-module (guix hg-download) |
d4d0a155 | 45 | #:use-module (guix utils) |
9af704c5 RH |
46 | #:use-module (gnu packages) |
47 | #:use-module (gnu packages algebra) | |
4c40ed9d | 48 | #:use-module (gnu packages assembly) |
e5f9ec8b | 49 | #:use-module (gnu packages audio) |
45c58518 | 50 | #:use-module (gnu packages autogen) |
9af704c5 | 51 | #:use-module (gnu packages autotools) |
365a9947 | 52 | #:use-module (gnu packages backup) |
9af704c5 | 53 | #:use-module (gnu packages base) |
fc2ff004 | 54 | #:use-module (gnu packages bash) |
1457f766 | 55 | #:use-module (gnu packages bison) |
9af704c5 | 56 | #:use-module (gnu packages boost) |
365a9947 | 57 | #:use-module (gnu packages build-tools) |
1403e1f7 | 58 | #:use-module (gnu packages cdrom) |
f43e4104 | 59 | #:use-module (gnu packages check) |
e5f9ec8b | 60 | #:use-module (gnu packages compression) |
f43e4104 | 61 | #:use-module (gnu packages cross-base) |
e5f9ec8b | 62 | #:use-module (gnu packages curl) |
bb3ddda2 | 63 | #:use-module (gnu packages digest) |
e8ffa382 | 64 | #:use-module (gnu packages elf) |
1457f766 | 65 | #:use-module (gnu packages flex) |
6f483f8d | 66 | #:use-module (gnu packages fltk) |
e5f9ec8b RH |
67 | #:use-module (gnu packages fonts) |
68 | #:use-module (gnu packages fontutils) | |
9af704c5 | 69 | #:use-module (gnu packages freedesktop) |
9380b0a0 | 70 | #:use-module (gnu packages fribidi) |
e5f9ec8b | 71 | #:use-module (gnu packages game-development) |
cbf58afa | 72 | #:use-module (gnu packages gcc) |
e5f9ec8b RH |
73 | #:use-module (gnu packages gettext) |
74 | #:use-module (gnu packages gl) | |
75 | #:use-module (gnu packages glib) | |
c723aa98 | 76 | #:use-module (gnu packages gnome) |
e5f9ec8b RH |
77 | #:use-module (gnu packages gtk) |
78 | #:use-module (gnu packages image) | |
9af704c5 | 79 | #:use-module (gnu packages libedit) |
e5f9ec8b RH |
80 | #:use-module (gnu packages libusb) |
81 | #:use-module (gnu packages linux) | |
c8b2fd28 NG |
82 | #:use-module (gnu packages lua) |
83 | #:use-module (gnu packages maths) | |
4c40ed9d | 84 | #:use-module (gnu packages mp3) |
c8b2fd28 | 85 | #:use-module (gnu packages music) |
9af704c5 | 86 | #:use-module (gnu packages ncurses) |
c8b2fd28 | 87 | #:use-module (gnu packages networking) |
e5f9ec8b RH |
88 | #:use-module (gnu packages pkg-config) |
89 | #:use-module (gnu packages pulseaudio) | |
9af704c5 | 90 | #:use-module (gnu packages python) |
e5f9ec8b RH |
91 | #:use-module (gnu packages qt) |
92 | #:use-module (gnu packages sdl) | |
9d0c291e | 93 | #:use-module (gnu packages sphinx) |
cd0322a3 | 94 | #:use-module (gnu packages sqlite) |
c8b2fd28 NG |
95 | #:use-module (gnu packages texinfo) |
96 | #:use-module (gnu packages textutils) | |
e5f9ec8b RH |
97 | #:use-module (gnu packages tls) |
98 | #:use-module (gnu packages upnp) | |
99 | #:use-module (gnu packages video) | |
9af704c5 | 100 | #:use-module (gnu packages vulkan) |
e5f9ec8b | 101 | #:use-module (gnu packages wxwidgets) |
9af704c5 | 102 | #:use-module (gnu packages xdisorg) |
e5f9ec8b | 103 | #:use-module (gnu packages xiph) |
9af704c5 | 104 | #:use-module (gnu packages xml) |
e5f9ec8b | 105 | #:use-module (gnu packages xorg) |
c8b2fd28 | 106 | #:use-module (gnu packages web) |
9af704c5 | 107 | #:use-module (guix build-system cmake) |
f6a0be2f | 108 | #:use-module (guix build-system glib-or-gtk) |
f43e4104 | 109 | #:use-module (guix build-system gnu) |
365a9947 | 110 | #:use-module (guix build-system meson) |
f43e4104 | 111 | #:use-module (guix build-system python)) |
9af704c5 | 112 | |
1457f766 FB |
113 | (define-public vice |
114 | (package | |
115 | (name "vice") | |
e2a14197 | 116 | (version "3.6") |
1457f766 FB |
117 | (source |
118 | (origin | |
119 | (method url-fetch) | |
120 | (uri (string-append "mirror://sourceforge/vice-emu/releases/" | |
121 | "vice-" version ".tar.gz")) | |
122 | (sha256 | |
e2a14197 | 123 | (base32 "1zfkl9j40v2417l1fmczdvl9yzh81jlpcy5cl2svjzb2rrffbgv5")))) |
1457f766 FB |
124 | (build-system gnu-build-system) |
125 | (arguments | |
e2a14197 TGR |
126 | `(#:configure-flags '("--disable-html-docs" |
127 | "--disable-pdf-docs"))) | |
1457f766 | 128 | (native-inputs |
8394619b LC |
129 | (list bison |
130 | dos2unix | |
131 | flex | |
132 | `(,glib "bin") ; for glib-genmarshal, etc. | |
133 | pkg-config)) | |
1457f766 | 134 | (inputs |
8394619b LC |
135 | (list alsa-lib |
136 | glew | |
137 | glib | |
138 | gtk+ | |
139 | pulseaudio | |
140 | sdl | |
141 | sdl-image | |
142 | xa)) | |
1457f766 FB |
143 | (home-page "https://vice-emu.sourceforge.io/") |
144 | (synopsis "The versatile Commodore emulator") | |
145 | (description | |
146 | "VICE is a program that emulates the C64, the C64DTV, the C128, the | |
147 | VIC20, practically all PET models, the PLUS4 and the CBM-II (aka | |
148 | C610/C510). An extra emulator is provided for C64 expanded with the CMD | |
149 | SuperCPU.") | |
150 | (license license:gpl2+))) | |
151 | ||
88f5665f LP |
152 | (define-public blastem |
153 | (package | |
154 | (name "blastem") | |
155 | (version "0.6.2") | |
156 | (source (origin | |
157 | (method hg-fetch) | |
158 | (uri (hg-reference | |
159 | (url "https://www.retrodev.com/repos/blastem") | |
160 | (changeset (string-append "v" version)))) | |
161 | (file-name (string-append name "-" version "-checkout")) | |
162 | (sha256 | |
163 | (base32 | |
164 | "08ycfisivh9rb9vmijlrpdryaw8spd81ck48960p15cnf8h2535q")) | |
165 | (modules '((guix build utils))) | |
166 | (snippet | |
167 | '(begin | |
168 | ;; TODO: Separately package and unbundle nuklear | |
169 | (delete-file-recursively "zlib"))))) | |
170 | (build-system gnu-build-system) | |
171 | (arguments | |
172 | `(#:make-flags (list (string-append "CC=" ,(cc-for-target)) | |
173 | "HOST_ZLIB=1" | |
174 | "HAS_PROC=-DHAS_PROC" | |
175 | (string-append "CONFIG_PATH=" | |
176 | %output "/share/blastem") | |
177 | (string-append "DATA_PATH=" | |
178 | %output "/share/blastem")) | |
179 | #:tests? #f ; No check target and custom tests don't seem to build | |
180 | #:imported-modules | |
181 | ((guix build copy-build-system) | |
182 | ,@%gnu-build-system-modules) | |
183 | #:modules | |
184 | (((guix build copy-build-system) | |
185 | #:prefix copy:) | |
186 | (guix build gnu-build-system) | |
187 | (guix build utils)) | |
188 | #:phases | |
189 | (modify-phases %standard-phases | |
190 | (add-after 'unpack 'fix-source | |
191 | (lambda _ | |
192 | (substitute* (find-files "." ".*\\.[ch]") | |
bbdc4d73 GLV |
193 | (("\"zlib/zlib.h\"") "<zlib.h>")) |
194 | (substitute* "Makefile" | |
195 | (("CFLAGS:=-std=gnu99" all) | |
196 | (string-append all " -fcommon"))))) | |
88f5665f LP |
197 | (delete 'configure) |
198 | (replace 'install | |
199 | (lambda* args | |
200 | (apply (assoc-ref copy:%standard-phases 'install) | |
201 | #:install-plan | |
202 | '(("." "bin" #:include ("blastem" "vgmplay")) | |
203 | ("." "share/blastem" | |
204 | #:include ("default.cfg" "rom.db") | |
205 | #:exclude ("android")) | |
206 | ("shaders" "share/blastem/shaders")) | |
207 | args)))))) | |
208 | (inputs | |
8394619b | 209 | (list glew mesa sdl2 zlib)) |
88f5665f | 210 | (native-inputs |
8394619b | 211 | (list pkg-config)) |
88f5665f LP |
212 | (home-page "https://www.retrodev.com/blastem/") |
213 | (synopsis "Genesis/Mega Drive emulator") | |
214 | (description "Blastem is an emulator for the Sega Genesis/Mega Drive | |
215 | console.") | |
216 | (license license:gpl3+))) | |
217 | ||
9af704c5 RH |
218 | (define-public desmume |
219 | (package | |
220 | (name "desmume") | |
221 | (version "0.9.11") | |
222 | (source | |
223 | (origin | |
224 | (method url-fetch) | |
225 | (uri (string-append | |
226 | "mirror://sourceforge/desmume/desmume/" | |
227 | version "/desmume-" version ".tar.gz")) | |
228 | (sha256 | |
229 | (base32 | |
f2674207 | 230 | "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs")) |
231 | (patches (search-patches "desmume-gcc6-fixes.patch" | |
232 | "desmume-gcc7-fixes.patch")))) | |
9af704c5 RH |
233 | (build-system gnu-build-system) |
234 | (arguments | |
235 | ;; Enable support for WiFi and microphone. | |
236 | `(#:configure-flags '("--enable-wifi" | |
237 | "--enable-openal"))) | |
238 | (native-inputs | |
8394619b | 239 | (list pkg-config intltool)) |
9af704c5 | 240 | (inputs |
8394619b | 241 | (list zlib sdl glib gtk+-2 glu)) |
9af704c5 RH |
242 | (home-page "http://desmume.org/") |
243 | (synopsis "Nintendo DS emulator") | |
244 | (description | |
245 | "DeSmuME is an emulator for the Nintendo DS handheld gaming console.") | |
246 | (license license:gpl2))) | |
e5f9ec8b RH |
247 | |
248 | ;; Building from recent Git because the official 5.0 release no longer builds. | |
6d36cace KK |
249 | ;; Following commits and revision numbers of beta versions listed at |
250 | ;; https://dolphin-emu.org/download/. | |
e5f9ec8b | 251 | (define-public dolphin-emu |
6d36cace KK |
252 | (let ((commit "a34823df61df65168aa40ef5e82e44defd4a0138") |
253 | (revision "13178")) | |
e5f9ec8b RH |
254 | (package |
255 | (name "dolphin-emu") | |
256 | (version (git-version "5.0" revision commit)) | |
257 | (source | |
258 | (origin | |
259 | (method git-fetch) | |
260 | (uri (git-reference | |
b0e7b699 | 261 | (url "https://github.com/dolphin-emu/dolphin") |
e5f9ec8b RH |
262 | (commit commit))) |
263 | (file-name (git-file-name name version)) | |
85280804 EF |
264 | (modules '((guix build utils))) |
265 | (snippet | |
266 | '(begin | |
267 | ;; Remove external stuff we don't need. | |
268 | (for-each (lambda (dir) | |
269 | (delete-file-recursively | |
270 | (string-append "Externals/" dir))) | |
fab8d41c | 271 | '("LZO" "OpenAL" "Qt" "SFML" "curl" "ffmpeg" |
85280804 | 272 | "gettext" "hidapi" "libpng" "libusb" "mbedtls" |
2b332c51 | 273 | "miniupnpc" "MoltenVK" "zlib")) |
85280804 EF |
274 | ;; Clean up source. |
275 | (for-each delete-file (find-files "." ".*\\.(bin|dsy|exe|jar|rar)$")) | |
276 | #t)) | |
e5f9ec8b RH |
277 | (sha256 |
278 | (base32 | |
6d36cace | 279 | "0j6hnj60iai366kl0kdbn1jkwc183l02g65mp2vq4qb2yd4399l1")))) |
e5f9ec8b RH |
280 | (build-system cmake-build-system) |
281 | (arguments | |
282 | '(#:tests? #f | |
e5f9ec8b RH |
283 | #:phases |
284 | (modify-phases %standard-phases | |
6bebad77 | 285 | (add-before 'configure 'generate-fonts&hardcore-libvulkan-path |
e5f9ec8b RH |
286 | (lambda* (#:key inputs outputs #:allow-other-keys) |
287 | (let ((fontfile | |
d468a03a LC |
288 | (search-input-file inputs |
289 | "/share/fonts/truetype/wqy-microhei.ttc")) | |
6bebad77 | 290 | (libvulkan |
377e9453 | 291 | (search-input-file inputs "/lib/libvulkan.so"))) |
e5f9ec8b | 292 | (chdir "docs") |
0fe041bd | 293 | (invoke "bash" "-c" "g++ -O2 $(freetype-config \ |
e5f9ec8b RH |
294 | --cflags --libs) gc-font-tool.cpp -o gc-font-tool") |
295 | (invoke "./gc-font-tool" "a" fontfile "font_western.bin") | |
296 | (invoke "./gc-font-tool" "s" fontfile "font_japanese.bin") | |
297 | (copy-file "font_japanese.bin" "../Data/Sys/GC/font_japanese.bin") | |
298 | (copy-file "font_western.bin" "../Data/Sys/GC/font_western.bin") | |
299 | (chdir "..") | |
6bebad77 | 300 | (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp" |
6d36cace KK |
301 | (("\"vulkan\", 1") (string-append "\"vulkan\"")) |
302 | (("\"vulkan\"") (string-append "\"" libvulkan "\"")) | |
303 | (("Common::DynamicLibrary::GetVersionedFilename") "")) | |
e5f9ec8b RH |
304 | #t)))) |
305 | ||
fab8d41c RH |
306 | ;; The FindGTK2 cmake script only checks hardcoded directories for |
307 | ;; glib/gtk headers. | |
308 | ||
e5f9ec8b | 309 | #:configure-flags |
fab8d41c | 310 | (list (string-append "-DX11_INCLUDE_DIR=" |
e5f9ec8b RH |
311 | (assoc-ref %build-inputs "libx11") |
312 | "/include") | |
313 | (string-append "-DX11_LIBRARIES=" | |
314 | (assoc-ref %build-inputs "libx11") | |
315 | "/lib/libX11.so") | |
316 | "-DX11_FOUND=1"))) | |
e5f9ec8b RH |
317 | (native-inputs |
318 | `(("pkg-config" ,pkg-config) | |
f2d97d57 | 319 | ("gettext" ,gettext-minimal))) |
e5f9ec8b | 320 | (inputs |
8394619b LC |
321 | (list alsa-lib |
322 | ao | |
323 | bluez | |
324 | curl | |
325 | eudev | |
326 | ffmpeg | |
327 | font-wqy-microhei | |
328 | freetype | |
329 | glew | |
330 | glib | |
331 | glu | |
332 | gtk+-2 | |
333 | hidapi | |
334 | libevdev | |
335 | libpng | |
336 | libusb | |
337 | libx11 | |
338 | libxi | |
339 | libxrandr | |
340 | lzo | |
341 | mbedtls-apache | |
342 | mesa | |
343 | miniupnpc | |
344 | openal | |
345 | pugixml | |
346 | pulseaudio | |
347 | qtbase-5 | |
348 | sdl2 | |
349 | sfml | |
350 | soil | |
351 | soundtouch | |
352 | vulkan-loader | |
353 | zlib)) | |
e5f9ec8b RH |
354 | (home-page "https://dolphin-emu.org/") |
355 | (synopsis "Nintendo Wii and GameCube emulator") | |
356 | (description | |
357 | "Dolphin is an emulator for two Nintendo video game consoles: the | |
358 | GameCube and the Wii. It provides compatibility with all PC controllers, | |
359 | turbo speed, networked multiplayer, and graphical enhancements.") | |
e89bfc2d | 360 | (supported-systems '("x86_64-linux" "aarch64-linux")) |
e5f9ec8b RH |
361 | ; dolphin/Data/Sys/GC/font_*.bin: Licensed under ASL2.0. |
362 | (license (list license:gpl2+ license:asl2.0 license:fdl1.2+))))) | |
9af704c5 RH |
363 | |
364 | (define-public dosbox | |
365 | (package | |
366 | (name "dosbox") | |
b09e4960 | 367 | (version "0.74-3") |
9af704c5 | 368 | (source (origin |
478040d4 RH |
369 | (method url-fetch) |
370 | (uri (string-append "https://sourceforge.net/projects/dosbox" | |
371 | "/files/dosbox/" version "/dosbox-" | |
372 | version ".tar.gz/download")) | |
373 | (file-name (string-append name "-" version ".tar.gz")) | |
9af704c5 RH |
374 | (sha256 |
375 | (base32 | |
b09e4960 | 376 | "02i648i50dwicv1vaql15rccv4g8h5blf5g6inv67lrfxpbkvlf0")))) |
9af704c5 | 377 | (build-system gnu-build-system) |
9af704c5 | 378 | (native-inputs |
8394619b | 379 | (list autoconf automake)) |
9af704c5 | 380 | (inputs |
8394619b LC |
381 | (list sdl |
382 | libpng | |
383 | zlib | |
384 | alsa-lib | |
385 | glu | |
386 | mesa)) | |
a30f20d4 | 387 | (home-page "https://www.dosbox.com") |
9af704c5 RH |
388 | (synopsis "X86 emulator with CGA/EGA/VGA/etc. graphics and sound") |
389 | (description "DOSBox is a DOS-emulator that uses the SDL library. DOSBox | |
390 | also emulates CPU:286/386 realmode/protected mode, Directory | |
391 | FileSystem/XMS/EMS, Tandy/Hercules/CGA/EGA/VGA/VESA graphics, a | |
392 | SoundBlaster/Gravis Ultra Sound card for excellent sound compatibility with | |
393 | older games.") | |
394 | (license license:gpl2+))) | |
395 | ||
ee5f4690 TGR |
396 | (define-public dosbox-staging |
397 | ;; This is not a patch staging area for DOSBox, but an unaffiliated fork. | |
398 | (package | |
399 | (name "dosbox-staging") | |
71c561f1 | 400 | (version "0.79.1") |
ee5f4690 TGR |
401 | (source |
402 | (origin | |
403 | (method git-fetch) | |
404 | (uri (git-reference | |
405 | (url "https://github.com/dosbox-staging/dosbox-staging") | |
406 | (commit (string-append "v" version)))) | |
407 | (file-name (git-file-name name version)) | |
408 | (sha256 | |
71c561f1 | 409 | (base32 "0wdnkz3djjc514hn945fr9g9mnpnvk16fan84ny9g5wxak6dvsqp")))) |
365a9947 | 410 | (build-system meson-build-system) |
ee5f4690 | 411 | (arguments |
0f9bc3a8 TGR |
412 | (list #:configure-flags |
413 | #~(list | |
414 | ;; These both try to git clone subprojects. | |
415 | "-Dunit_tests=disabled" ; gtest | |
416 | "-Duse_mt32emu=false" | |
417 | ;; Not packaged. | |
418 | "-Duse_slirp=false") | |
419 | #:phases | |
420 | #~(modify-phases %standard-phases | |
421 | (add-after 'unpack 'fix-includes | |
422 | (lambda _ | |
71c561f1 TGR |
423 | ;; This unnecessary file has an encoding error. |
424 | (delete-file "./src/libs/sdlcd/macosx/SDLOSXCAGuard.h") | |
0f9bc3a8 TGR |
425 | (substitute* (find-files "." "\\.(cpp|h)") |
426 | (("^(#include <)(SDL[_.])" _ include file) | |
427 | (string-append include "SDL2/" file)))))))) | |
ee5f4690 | 428 | (native-inputs |
8394619b | 429 | (list pkg-config)) |
ee5f4690 | 430 | (inputs |
5a94c6cb TGR |
431 | (list alsa-lib |
432 | fluidsynth | |
71c561f1 | 433 | iir |
5a94c6cb TGR |
434 | libpng |
435 | mesa | |
436 | opusfile | |
437 | (sdl-union (list sdl2 sdl2-net)) | |
71c561f1 | 438 | speexdsp |
5a94c6cb | 439 | zlib)) |
ee5f4690 TGR |
440 | (home-page "https://dosbox-staging.github.io") |
441 | (synopsis "DOS/x86 PC emulator focusing on ease of use") | |
442 | (description | |
443 | "The DOSBox Staging project attempts to modernize DOSBox. | |
444 | ||
445 | DOSBox emulates an Intel x86 personal computer running an IBM PC compatible disk | |
446 | operating system (@dfn{DOS}) in both real and protected modes. It was primarily | |
447 | designed to run old DOS games, but aims to be fully compatible with all DOS | |
448 | programs and replicate the experience as accurately as possible. | |
449 | ||
450 | This fork fixes some perceived issues with DOSBox and adds new features such as | |
451 | Wayland support, PowerPC/POWER dynamic recompilation, and FluidSynth MIDI. | |
452 | Other features may be removed: for example, physical CDs can no longer be | |
453 | played, only emulated media. | |
454 | ||
455 | Graphical emulation includes contemporary text mode, Hercules, CGA, EGA, VGA, | |
456 | VESA, S3@tie{}Trio@tie{}64, and Tandy hardware. | |
457 | ||
458 | Emulated legacy sound devices range from a rudimentary `PC speaker' buzzer to | |
459 | the once state-of-the-art Gravis Utrasound sampling sound card. The default is | |
460 | a SoundBlaster 16 providing 16-bit stereo sound. MIDI is forwarded to the host | |
461 | through an emulated MPU-401. | |
462 | ||
463 | An emulated hardware modem is also included, letting one host or dial a | |
464 | @acronym{BBS, Bulletin Board System} across the Internet, network over IPX, and | |
465 | emulate a serial nullmodem over TCP/IP.") | |
466 | (license license:gpl3+))) | |
9af704c5 | 467 | |
fad22f09 EF |
468 | (define-public qtmips |
469 | (package | |
470 | (name "qtmips") | |
cacab685 | 471 | (version "0.7.5") |
fad22f09 EF |
472 | (source (origin |
473 | (method git-fetch) | |
474 | (uri (git-reference | |
475 | (url "https://github.com/cvut/QtMips") | |
476 | (commit (string-append "v" version)))) | |
477 | (file-name (git-file-name name version)) | |
478 | (sha256 | |
479 | (base32 | |
cacab685 | 480 | "1fal7a8y5g0rqqjrk795jh1l50ihz01ppjnrfjrk9vkjbd59szbp")))) |
fad22f09 EF |
481 | (build-system cmake-build-system) |
482 | (arguments | |
483 | '(#:phases | |
484 | (modify-phases %standard-phases | |
485 | (replace 'configure | |
486 | (lambda* (#:key outputs #:allow-other-keys) | |
487 | (invoke "qmake" | |
488 | (string-append "PREFIX=" (assoc-ref outputs "out")) | |
489 | "qtmips.pro"))) | |
490 | (replace 'check | |
491 | (lambda* (#:key tests? #:allow-other-keys) | |
492 | (substitute* "tests/test.sh" | |
493 | (("qtchooser.*") "")) | |
494 | (substitute* '("tests/cpu_trap/test.sh" | |
495 | "tests/registers/test.sh") | |
496 | (("sub-qtmips_cli") "qtmips_cli")) | |
497 | (if tests? | |
498 | (invoke "tests/run-all.sh") | |
499 | #t))) | |
500 | (replace 'install | |
501 | ;; There is no install target. | |
502 | (lambda* (#:key outputs #:allow-other-keys) | |
503 | (let* ((out (assoc-ref outputs "out")) | |
504 | (bin (string-append out "/bin")) | |
505 | (apps (string-append out "/share/applications")) | |
506 | (icons (string-append out "/share/icons/hicolor"))) | |
507 | (install-file "qtmips_gui/qtmips_gui" bin) | |
508 | (install-file "qtmips_cli/qtmips_cli" bin) | |
509 | (install-file "data/qtmips.desktop" apps) | |
510 | (install-file "data/icons/qtmips_gui.svg" | |
511 | (string-append icons "/scalable/apps")) | |
512 | (install-file "data/icons/qtmips_gui.png" | |
513 | (string-append icons "/48x48/apps")) | |
514 | #t)))) | |
515 | #:tests? #f)) ; test suite wants mips toolchain | |
516 | (inputs | |
8394619b | 517 | (list elfutils qtbase-5)) |
fad22f09 EF |
518 | (home-page "https://github.com/cvut/QtMips") |
519 | (synopsis "MIPS CPU emulator") | |
520 | (description "This package contains a MIPS CPU emulator. The simulator | |
521 | accepts ELF statically linked executables compiled for 32-bit big-endian | |
522 | MIPS target, targeting mips-linux-gnu or mips-elf.") | |
523 | (license license:gpl2+))) ; License file says GPL3 | |
524 | ||
9af704c5 | 525 | (define-public emulation-station |
4530fe8e JK |
526 | ;; No release for a long time, new commits fix build issues |
527 | (let ((commit "9cc42adff67946175d2b7e25c6ae69cc374e98a0") | |
528 | (revision "1")) | |
9af704c5 RH |
529 | (package |
530 | (name "emulation-station") | |
4530fe8e | 531 | (version (git-version "2.0.1" revision commit)) |
9af704c5 RH |
532 | (source (origin |
533 | (method git-fetch) ; no tarball available | |
534 | (uri (git-reference | |
b0e7b699 | 535 | (url "https://github.com/Aloshi/EmulationStation") |
9af704c5 | 536 | (commit commit))) ; no version tag |
4530fe8e | 537 | (file-name (git-file-name name version)) |
9af704c5 RH |
538 | (sha256 |
539 | (base32 | |
4530fe8e | 540 | "1cva0ns650v17lfn8in095zci6lc43d23f1x3mlzc41qfqa6mbd1")))) |
9af704c5 RH |
541 | (build-system cmake-build-system) |
542 | (arguments | |
543 | '(#:tests? #f)) ; no tests | |
544 | (inputs | |
545 | `(("alsa-lib" ,alsa-lib) | |
546 | ("boost" ,boost) | |
547 | ("curl" ,curl) | |
548 | ("eigin" ,eigen) | |
549 | ("freeimage" ,freeimage) | |
550 | ("freetype" ,freetype) | |
551 | ("mesa" ,mesa) | |
552 | ("sdl2" ,sdl2))) | |
553 | (synopsis "Video game console emulator front-end") | |
554 | (description "EmulationStation provides a graphical front-end to a large | |
555 | number of video game console emulators. It features an interface that is | |
556 | usable with any game controller that has at least 4 buttons, theming support, | |
557 | and a game metadata scraper.") | |
76dc85e4 | 558 | (home-page "https://emulationstation.org") |
9af704c5 RH |
559 | (license license:expat)))) |
560 | ||
561 | (define-public higan | |
562 | (package | |
563 | (name "higan") | |
76cc11a0 | 564 | (version "110") |
9af704c5 RH |
565 | (source |
566 | (origin | |
f3686999 JK |
567 | (method git-fetch) |
568 | (uri (git-reference | |
b0e7b699 | 569 | (url "https://github.com/higan-emu/higan") |
76cc11a0 | 570 | (commit (string-append "v" version)))) |
f3686999 | 571 | (file-name (git-file-name name version)) |
9af704c5 | 572 | (sha256 |
76cc11a0 | 573 | (base32 "11rvm53c3p2f6zk8xbyv2j51xp8zmqnch7zravhj3fk590qrjrr2")))) |
9af704c5 RH |
574 | (build-system gnu-build-system) |
575 | (native-inputs | |
8394619b | 576 | (list pkg-config)) |
9af704c5 RH |
577 | (inputs |
578 | `(("alsa-lib" ,alsa-lib) | |
579 | ("ao" ,ao) | |
580 | ("eudev" ,eudev) | |
581 | ("gtk+" ,gtk+-2) | |
582 | ("gtksourceview-2" ,gtksourceview-2) | |
76cc11a0 | 583 | ("libxrandr" ,libxrandr) |
9af704c5 RH |
584 | ("libxv" ,libxv) |
585 | ("mesa" ,mesa) | |
586 | ("openal" ,openal) | |
587 | ("pulseaudio" ,pulseaudio) | |
76cc11a0 | 588 | ("sdl2" ,sdl2))) |
9af704c5 RH |
589 | (arguments |
590 | '(#:phases | |
591 | (let ((build-phase (assoc-ref %standard-phases 'build)) | |
592 | (install-phase (assoc-ref %standard-phases 'install))) | |
593 | (modify-phases %standard-phases | |
594 | ;; The higan build system has no configure phase. | |
595 | (delete 'configure) | |
596 | (add-before 'build 'chdir-to-higan | |
597 | (lambda _ | |
6d34d3f8 JK |
598 | (chdir "higan") |
599 | #t)) | |
9af704c5 RH |
600 | (add-before 'install 'create-/share/applications |
601 | (lambda* (#:key outputs #:allow-other-keys) | |
602 | (let ((out (assoc-ref outputs "out"))) | |
603 | ;; It seems the author forgot to do this in the Makefile. | |
6d34d3f8 JK |
604 | (mkdir-p (string-append out "/share/applications")) |
605 | #t))) | |
9af704c5 RH |
606 | (add-after 'install 'chdir-to-icarus |
607 | (lambda _ | |
6d34d3f8 JK |
608 | (chdir "../icarus") |
609 | #t)) | |
9af704c5 RH |
610 | (add-after 'chdir-to-icarus 'build-icarus build-phase) |
611 | (add-after 'build-icarus 'install-icarus install-phase) | |
612 | (add-after 'install-icarus 'wrap-higan-executable | |
613 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
614 | (let* ((out (assoc-ref outputs "out")) | |
615 | (bin (string-append out "/bin")) | |
616 | (higan (string-append bin "/higan")) | |
617 | (higan-original (string-append higan "-original")) | |
bc64d955 | 618 | (bash (search-input-file inputs "/bin/bash")) |
9af704c5 RH |
619 | (coreutils (assoc-ref inputs "coreutils")) |
620 | (mkdir (string-append coreutils "/bin/mkdir")) | |
621 | (cp (string-append coreutils "/bin/cp")) | |
622 | (cp-r (string-append cp " -r --no-preserve=mode"))) | |
623 | ;; First, have the executable make sure ~/.local/share/higan | |
624 | ;; contains up to date files. Higan insists on looking there | |
625 | ;; for these data files. | |
626 | (rename-file higan higan-original) | |
627 | (with-output-to-file higan | |
628 | (lambda () | |
629 | (display | |
630 | (string-append | |
631 | "#!" bash "\n" | |
632 | ;; higan doesn't respect $XDG_DATA_HOME | |
633 | mkdir " -p ~/.local/share\n" | |
634 | cp-r " " out "/share/higan ~/.local/share\n" | |
635 | "exec " higan-original)))) | |
636 | (chmod higan #o555) | |
637 | ;; Second, make sure higan will find icarus in PATH. | |
638 | (wrap-program higan | |
6d34d3f8 JK |
639 | `("PATH" ":" prefix (,bin))) |
640 | #t))))) | |
9af704c5 RH |
641 | #:make-flags |
642 | (list "compiler=g++" | |
643 | (string-append "prefix=" (assoc-ref %outputs "out"))) | |
644 | ;; There is no test suite. | |
645 | #:tests? #f)) | |
76cc11a0 | 646 | (home-page "https://github.com/higan-emu/higan/") |
6e2f7dc5 | 647 | (synopsis "Multi-system emulator") |
9af704c5 | 648 | (description |
6e2f7dc5 NG |
649 | "higan is a multi-system emulator with an uncompromising focus on |
650 | accuracy and code readability. | |
651 | ||
652 | It currently emulates the following systems: Famicom, Famicom Disk System, | |
653 | Super Famicom, Super Game Boy, Game Boy, Game Boy Color, Game Boy Advance, | |
654 | Game Boy Player, SG-1000, SC-3000, Master System, Game Gear, Mega Drive, Mega | |
655 | CD, PC Engine, SuperGrafx, MSX, MSX2, ColecoVision, Neo Geo Pocket, Neo Geo | |
656 | Pocket Color, WonderSwan, WonderSwan Color, SwanCrystal, Pocket Challenge | |
657 | V2.") | |
76cc11a0 | 658 | (license license:gpl3+))) |
9af704c5 | 659 | |
6dd2ad26 NG |
660 | (define-public mednafen |
661 | (package | |
662 | (name "mednafen") | |
0b9e5d47 | 663 | (version "1.29.0") |
6dd2ad26 NG |
664 | (source |
665 | (origin | |
666 | (method url-fetch) | |
667 | (uri (string-append "https://mednafen.github.io/releases/files/" | |
668 | "mednafen-" version ".tar.xz")) | |
669 | (sha256 | |
0b9e5d47 | 670 | (base32 "0binkxnki8w8jgiyf3xr9503m5cynlf5vylb087vxybp53qbqgys")))) |
6dd2ad26 NG |
671 | (build-system gnu-build-system) |
672 | (arguments | |
673 | `(#:configure-flags | |
674 | (list | |
675 | ;; "--with-external-mpcdec" | |
676 | "--with-external-lzo"))) | |
677 | (native-inputs | |
8394619b | 678 | (list pkg-config)) |
6dd2ad26 NG |
679 | (inputs |
680 | `(("alsa" ,alsa-lib) | |
4605ea1a | 681 | ("flac" ,flac) |
6dd2ad26 NG |
682 | ;; ("libmpcdec" ,libmpcdec) FIXME: not recognized. |
683 | ("libsndfile" ,libsndfile) | |
684 | ("lzo" ,lzo) | |
685 | ("sdl2" ,sdl2) | |
686 | ("zlib" ,zlib))) | |
687 | (home-page "https://mednafen.github.io/") | |
688 | (synopsis "Multi-system emulator utilizing OpenGL and SDL") | |
689 | (description | |
690 | "Mednafen is a portable, utilizing OpenGL and SDL, argument-driven | |
691 | multi-system emulator. Mednafen has the ability to remap hotkey functions and | |
692 | virtual system inputs to a keyboard, a joystick, or both simultaneously. Save | |
693 | states are supported, as is real-time game rewinding. Screen snapshots may be | |
694 | taken, in the PNG file format, at the press of a button. Mednafen can record | |
695 | audiovisual movies in the QuickTime file format, with several different | |
696 | lossless codecs supported. | |
697 | ||
698 | The following systems are supported: | |
699 | ||
700 | @itemize | |
701 | @item Apple II/II+ | |
702 | @item Atari Lynx | |
703 | @item Neo Geo Pocket (Color) | |
704 | @item WonderSwan | |
705 | @item GameBoy (Color) | |
706 | @item GameBoy Advance | |
707 | @item Nintendo Entertainment System | |
708 | @item Super Nintendo Entertainment System/Super Famicom | |
709 | @item Virtual Boy | |
710 | @item PC Engine/TurboGrafx 16 (CD) | |
711 | @item SuperGrafx | |
712 | @item PC-FX | |
713 | @item Sega Game Gear | |
714 | @item Sega Genesis/Megadrive | |
715 | @item Sega Master System | |
716 | @item Sega Saturn (experimental, x86_64 only) | |
717 | @item Sony PlayStation | |
718 | @end itemize") | |
719 | ;; Main license is GPL2+. Some parts are BSD-3. | |
720 | (license (list license:gpl2+ license:bsd-3)))) | |
721 | ||
9af704c5 RH |
722 | (define-public mgba |
723 | (package | |
724 | (name "mgba") | |
6bb130d6 | 725 | (version "0.10.0") |
d63e0ee7 NG |
726 | (source |
727 | (origin | |
728 | (method git-fetch) | |
729 | (uri (git-reference | |
b0e7b699 | 730 | (url "https://github.com/mgba-emu/mgba") |
d63e0ee7 NG |
731 | (commit version))) |
732 | (file-name (git-file-name name version)) | |
733 | (sha256 | |
6bb130d6 | 734 | (base32 "14miy6fgg4dy2pp0w17pnqzizrj6yf468i5l7rswn3yszpd5rn6s")) |
d63e0ee7 NG |
735 | (modules '((guix build utils))) |
736 | (snippet | |
737 | ;; Make sure we don't use the bundled software. | |
738 | '(begin | |
739 | (for-each | |
740 | (lambda (subdir) | |
741 | (let ((lib-subdir (string-append "src/third-party/" subdir))) | |
742 | (delete-file-recursively lib-subdir))) | |
eb1a5ddd | 743 | '("libpng" "lzma" "sqlite3" "zlib")))))) |
9af704c5 RH |
744 | (build-system cmake-build-system) |
745 | (arguments | |
746 | `(#:tests? #f ;no "test" target | |
747 | #:configure-flags | |
748 | (list "-DUSE_LZMA=OFF" ;do not use bundled LZMA | |
6ea1c6fc | 749 | "-DUSE_LIBZIP=OFF"))) ;use "zlib" instead |
eb1a5ddd | 750 | (native-inputs |
eef8e2ec | 751 | (list pkg-config qttools-5)) |
eb1a5ddd | 752 | (inputs |
8394619b LC |
753 | (list ffmpeg |
754 | libedit | |
755 | libelf | |
756 | libepoxy | |
757 | libpng | |
758 | mesa | |
759 | minizip | |
760 | ncurses | |
761 | qtbase-5 | |
5f228543 | 762 | qtmultimedia-5 |
8394619b LC |
763 | sdl2 |
764 | sqlite | |
765 | zlib)) | |
9af704c5 RH |
766 | (home-page "https://mgba.io") |
767 | (synopsis "Game Boy Advance emulator") | |
768 | (description | |
769 | "mGBA is an emulator for running Game Boy Advance games. It aims to be | |
770 | faster and more accurate than many existing Game Boy Advance emulators, as | |
771 | well as adding features that other emulators lack. It also supports Game Boy | |
772 | and Game Boy Color games.") | |
1d0e8ec1 JK |
773 | ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+, "inih.c" is |
774 | ;; BSD-3, and "discord-rpc" is Expat. | |
775 | (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3 license:expat)))) | |
9af704c5 | 776 | |
c9e7acbf JK |
777 | (define-public sameboy |
778 | (package | |
779 | (name "sameboy") | |
68f09d1f | 780 | (version "0.15.6") |
c9e7acbf JK |
781 | (source |
782 | (origin | |
783 | (method git-fetch) | |
784 | (uri (git-reference | |
b0e7b699 | 785 | (url "https://github.com/LIJI32/SameBoy") |
c9e7acbf JK |
786 | (commit (string-append "v" version)))) |
787 | (file-name (git-file-name name version)) | |
788 | (sha256 | |
68f09d1f | 789 | (base32 "0a2fcsnv7ykj4kk2vpq9jjn8yjrx34n5s186rqvgj3dzm8w6xijs")))) |
c9e7acbf JK |
790 | (build-system gnu-build-system) |
791 | (native-inputs | |
8394619b | 792 | (list rgbds pkg-config)) |
c9e7acbf | 793 | (inputs |
8394619b | 794 | (list sdl2)) |
c9e7acbf JK |
795 | (arguments |
796 | `(#:tests? #f ; There are no tests | |
4bf2637c FG |
797 | #:make-flags `(,(string-append "CC=" ,(cc-for-target)) |
798 | "NATIVE_CC=gcc" "CONF=release" | |
c9e7acbf JK |
799 | ,(string-append "DATA_DIR=" |
800 | (assoc-ref %outputs "out") | |
801 | "/share/sameboy/")) | |
802 | #:phases | |
803 | (modify-phases %standard-phases | |
804 | (delete 'configure) | |
805 | (replace 'install | |
806 | (lambda* (#:key outputs #:allow-other-keys) | |
807 | (let* ((out (assoc-ref outputs "out")) | |
808 | (bin (string-append out "/bin")) | |
809 | (data (string-append out "/share/sameboy/"))) | |
810 | (with-directory-excursion "build/bin/SDL" | |
811 | (install-file "sameboy" bin) | |
812 | (delete-file "sameboy") | |
da878d73 | 813 | (copy-recursively "." data)))))))) |
c9e7acbf JK |
814 | (home-page "https://sameboy.github.io/") |
815 | (synopsis "Accurate Game Boy, Game Boy Color and Super Game Boy emulator") | |
816 | (description "SameBoy is a user friendly Game Boy, Game Boy Color | |
817 | and Super Game Boy emulator. SameBoy is accurate and includes a wide | |
818 | range of debugging features. It has all the features one would expect | |
819 | from an emulator---from save states to scaling filters.") | |
820 | (license license:expat))) | |
821 | ||
9af704c5 RH |
822 | (define-public mupen64plus-core |
823 | (package | |
824 | (name "mupen64plus-core") | |
825 | (version "2.5") | |
826 | (source | |
827 | (origin | |
10bcd4bb TGR |
828 | (method git-fetch) |
829 | (uri (git-reference | |
b0e7b699 | 830 | (url "https://github.com/mupen64plus/mupen64plus-core") |
10bcd4bb TGR |
831 | (commit version))) |
832 | (file-name (git-file-name name version)) | |
9af704c5 | 833 | (sha256 |
10bcd4bb | 834 | (base32 "116fndl6652zrp1r6ag4xv3dzp1x52mlvadj8xwflq07fd5rhri1")))) |
9af704c5 RH |
835 | (build-system gnu-build-system) |
836 | (native-inputs | |
8394619b | 837 | (list pkg-config which)) |
9af704c5 | 838 | (inputs |
8394619b LC |
839 | (list freetype |
840 | glu | |
841 | libpng | |
842 | mesa | |
843 | sdl2 | |
844 | zlib)) | |
9af704c5 RH |
845 | (arguments |
846 | '(#:phases | |
847 | (modify-phases %standard-phases | |
848 | ;; The mupen64plus build system has no configure phase. | |
3e678de0 RW |
849 | (replace 'configure |
850 | (lambda _ | |
851 | (substitute* "projects/unix/Makefile" | |
852 | (("\\$\\(CFLAGS\\)") | |
853 | "$(CFLAGS) -fcommon")))) | |
9af704c5 | 854 | ;; Makefile is in a subdirectory. |
3e678de0 RW |
855 | (add-before 'build 'chdir-to-project-directory |
856 | (lambda _ (chdir "projects/unix")))) | |
9af704c5 RH |
857 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
858 | (list "all" (string-append "PREFIX=" out))) | |
859 | ;; There are no tests. | |
860 | #:tests? #f)) | |
861 | ;; As per the Makefile (in projects/unix/Makefile): | |
862 | (supported-systems '("i686-linux" "x86_64-linux")) | |
eaa2b35c | 863 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
864 | (synopsis "Nintendo 64 emulator core library") |
865 | (description | |
866 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
867 | which is capable of accurately playing many games. This package contains the | |
868 | core library.") | |
869 | (license license:gpl2+))) | |
870 | ||
871 | (define-public mupen64plus-audio-sdl | |
872 | (package | |
873 | (name "mupen64plus-audio-sdl") | |
874 | (version "2.5") | |
875 | (source | |
876 | (origin | |
8c6d45cb TGR |
877 | (method git-fetch) |
878 | (uri (git-reference | |
b0e7b699 | 879 | (url "https://github.com/mupen64plus/mupen64plus-audio-sdl") |
8c6d45cb TGR |
880 | (commit version))) |
881 | (file-name (git-file-name name version)) | |
9af704c5 | 882 | (sha256 |
8c6d45cb | 883 | (base32 "0z19amfg9vr2pqjjri1ipc7hs681fzjcnb0f9y7bjhp5n8d7p6bb")))) |
9af704c5 RH |
884 | (build-system gnu-build-system) |
885 | (native-inputs | |
8394619b | 886 | (list pkg-config which)) |
9af704c5 | 887 | (inputs |
8394619b | 888 | (list mupen64plus-core sdl2)) |
9af704c5 RH |
889 | (arguments |
890 | '(#:phases | |
891 | (modify-phases %standard-phases | |
892 | ;; The mupen64plus build system has no configure phase. | |
893 | (delete 'configure) | |
894 | ;; Makefile is in a subdirectory. | |
895 | (add-before | |
896 | 'build 'cd-to-project-dir | |
897 | (lambda _ | |
898 | (chdir "projects/unix")))) | |
899 | #:make-flags | |
900 | (let ((out (assoc-ref %outputs "out")) | |
901 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
902 | (list "all" | |
903 | (string-append "PREFIX=" out) | |
904 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
905 | ;; There are no tests. | |
906 | #:tests? #f)) | |
cf5e9465 | 907 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
908 | (synopsis "Mupen64Plus SDL input plugin") |
909 | (description | |
910 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
911 | which is capable of accurately playing many games. This package contains the | |
912 | SDL audio plugin.") | |
913 | (license license:gpl2+))) | |
914 | ||
915 | (define-public mupen64plus-input-sdl | |
916 | (package | |
917 | (name "mupen64plus-input-sdl") | |
918 | (version "2.5") | |
919 | (source | |
920 | (origin | |
ef5ef8f5 TGR |
921 | (method git-fetch) |
922 | (uri (git-reference | |
b0e7b699 | 923 | (url "https://github.com/mupen64plus/mupen64plus-input-sdl") |
ef5ef8f5 TGR |
924 | (commit version))) |
925 | (file-name (git-file-name name version)) | |
9af704c5 | 926 | (sha256 |
ef5ef8f5 | 927 | (base32 "1dyazfbdjycdfslq8jixqiqhziw0rlkvach2r9dz91229jmkyc9c")))) |
9af704c5 RH |
928 | (build-system gnu-build-system) |
929 | (native-inputs | |
8394619b | 930 | (list which)) |
9af704c5 | 931 | (inputs |
8394619b | 932 | (list mupen64plus-core sdl2)) |
9af704c5 RH |
933 | (arguments |
934 | '(#:phases | |
935 | (modify-phases %standard-phases | |
936 | ;; The mupen64plus build system has no configure phase. | |
937 | (delete 'configure) | |
938 | ;; Makefile is in a subdirectory. | |
939 | (add-before | |
940 | 'build 'cd-to-project-dir | |
941 | (lambda _ | |
942 | (chdir "projects/unix")))) | |
943 | #:make-flags | |
944 | (let ((out (assoc-ref %outputs "out")) | |
945 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
946 | (list "all" | |
947 | (string-append "PREFIX=" out) | |
948 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
949 | ;; There are no tests. | |
950 | #:tests? #f)) | |
d738ce16 | 951 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
952 | (synopsis "Mupen64Plus SDL input plugin") |
953 | (description | |
954 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
955 | which is capable of accurately playing many games. This package contains the | |
956 | SDL input plugin.") | |
957 | (license license:gpl2+))) | |
958 | ||
959 | (define-public mupen64plus-rsp-hle | |
960 | (package | |
961 | (name "mupen64plus-rsp-hle") | |
962 | (version "2.5") | |
963 | (source | |
964 | (origin | |
c4f0c8ba TGR |
965 | (method git-fetch) |
966 | (uri (git-reference | |
b0e7b699 | 967 | (url "https://github.com/mupen64plus/mupen64plus-rsp-hle") |
c4f0c8ba TGR |
968 | (commit version))) |
969 | (file-name (git-file-name name version)) | |
9af704c5 | 970 | (sha256 |
c4f0c8ba | 971 | (base32 "0pi31qzjjp7aypdvvnz6ms18g09c4gqzxi6328zj8sji94b75gf0")))) |
9af704c5 RH |
972 | (build-system gnu-build-system) |
973 | (inputs | |
8394619b | 974 | (list mupen64plus-core)) |
9af704c5 RH |
975 | (arguments |
976 | '(#:phases | |
977 | (modify-phases %standard-phases | |
978 | ;; The mupen64plus build system has no configure phase. | |
979 | (delete 'configure) | |
980 | ;; Makefile is in a subdirectory. | |
981 | (add-before | |
982 | 'build 'cd-to-project-dir | |
983 | (lambda _ | |
984 | (chdir "projects/unix")))) | |
985 | #:make-flags | |
986 | (let ((out (assoc-ref %outputs "out")) | |
987 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
988 | (list "all" | |
989 | (string-append "PREFIX=" out) | |
990 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
991 | ;; There are no tests. | |
992 | #:tests? #f)) | |
cf396ea5 | 993 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
994 | (synopsis "Mupen64Plus SDL input plugin") |
995 | (description | |
996 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
997 | which is capable of accurately playing many games. This package contains the | |
998 | high-level emulation (HLE) RSP processor plugin.") | |
999 | (license license:gpl2+))) | |
1000 | ||
1001 | (define-public mupen64plus-rsp-z64 | |
1002 | (package | |
1003 | (name "mupen64plus-rsp-z64") | |
1004 | (version "2.0.0") | |
1005 | (source | |
1006 | (origin | |
052650c8 TGR |
1007 | (method git-fetch) |
1008 | (uri (git-reference | |
b0e7b699 | 1009 | (url "https://github.com/mupen64plus/mupen64plus-rsp-z64") |
052650c8 TGR |
1010 | (commit version))) |
1011 | (file-name (git-file-name name version)) | |
9af704c5 | 1012 | (sha256 |
052650c8 | 1013 | (base32 "0nfyjns9k8xbg3aqs7593nfaxvlj72h3l8h467442xlk8ajfcylx")))) |
9af704c5 RH |
1014 | (build-system gnu-build-system) |
1015 | (inputs | |
8394619b | 1016 | (list mupen64plus-core)) |
9af704c5 RH |
1017 | (arguments |
1018 | '(#:phases | |
1019 | (modify-phases %standard-phases | |
1020 | ;; The mupen64plus build system has no configure phase. | |
1021 | (delete 'configure) | |
1022 | ;; Makefile is in a subdirectory. | |
1023 | (add-before | |
1024 | 'build 'cd-to-project-dir | |
1025 | (lambda _ | |
1026 | (chdir "projects/unix")))) | |
1027 | #:make-flags | |
1028 | (let ((out (assoc-ref %outputs "out")) | |
1029 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
1030 | (list "all" | |
1031 | (string-append "PREFIX=" out) | |
1032 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
1033 | ;; There are no tests. | |
1034 | #:tests? #f)) | |
24b03073 | 1035 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
1036 | (synopsis "Mupen64Plus SDL input plugin") |
1037 | (description | |
1038 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
1039 | which is capable of accurately playing many games. This package contains the | |
1040 | Z64 RSP processor plugin.") | |
1041 | (license license:gpl2+))) | |
1042 | ||
1043 | (define-public mupen64plus-video-arachnoid | |
1044 | (package | |
1045 | (name "mupen64plus-video-arachnoid") | |
1046 | (version "2.0.0") | |
1047 | (source | |
1048 | (origin | |
2074c8bf TGR |
1049 | (method git-fetch) |
1050 | (uri (git-reference | |
b0e7b699 | 1051 | (url "https://github.com/mupen64plus/mupen64plus-video-arachnoid") |
2074c8bf TGR |
1052 | (commit version))) |
1053 | (file-name (git-file-name name version)) | |
9af704c5 | 1054 | (sha256 |
2074c8bf | 1055 | (base32 "1v9fqwpb6pawr8z5cm2ki7bqkks4iyr5c4jy4v5khj6h8zcv55gc")))) |
9af704c5 RH |
1056 | (build-system gnu-build-system) |
1057 | (native-inputs | |
8394619b | 1058 | (list pkg-config which)) |
9af704c5 | 1059 | (inputs |
8394619b | 1060 | (list mesa mupen64plus-core)) |
9af704c5 RH |
1061 | (arguments |
1062 | '(#:phases | |
1063 | (modify-phases %standard-phases | |
1064 | ;; The mupen64plus build system has no configure phase. | |
1065 | (delete 'configure) | |
1066 | ;; Makefile is in a subdirectory. | |
1067 | (add-before | |
1068 | 'build 'cd-to-project-dir | |
1069 | (lambda _ | |
1070 | (chdir "projects/unix")))) | |
1071 | #:make-flags | |
1072 | (let ((out (assoc-ref %outputs "out")) | |
1073 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
1074 | (list "all" | |
1075 | (string-append "PREFIX=" out) | |
1076 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
1077 | ;; There are no tests. | |
1078 | #:tests? #f)) | |
5daa2019 | 1079 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
1080 | (synopsis "Mupen64Plus Rice Video plugin") |
1081 | (description | |
1082 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
1083 | which is capable of accurately playing many games. This package contains the | |
1084 | Arachnoid video plugin.") | |
1085 | (license license:gpl2+))) | |
1086 | ||
1087 | (define-public mupen64plus-video-glide64 | |
1088 | (package | |
1089 | (name "mupen64plus-video-glide64") | |
1090 | (version "2.0.0") | |
1091 | (source | |
1092 | (origin | |
62536186 TGR |
1093 | (method git-fetch) |
1094 | (uri (git-reference | |
b0e7b699 | 1095 | (url "https://github.com/mupen64plus/mupen64plus-video-glide64") |
62536186 TGR |
1096 | (commit version))) |
1097 | (file-name (git-file-name name version)) | |
9af704c5 | 1098 | (sha256 |
62536186 | 1099 | (base32 "0qn5za7g7796kh2ag3xpmhbqg0yf71g9liz6ks0rha8pz73lgs01")))) |
9af704c5 RH |
1100 | (build-system gnu-build-system) |
1101 | (native-inputs | |
8394619b | 1102 | (list pkg-config which)) |
9af704c5 | 1103 | (inputs |
8394619b | 1104 | (list mesa mupen64plus-core sdl2)) |
9af704c5 RH |
1105 | (arguments |
1106 | '(#:phases | |
1107 | (modify-phases %standard-phases | |
1108 | ;; The mupen64plus build system has no configure phase. | |
1109 | (delete 'configure) | |
1110 | ;; Makefile is in a subdirectory. | |
1111 | (add-before | |
1112 | 'build 'cd-to-project-dir | |
1113 | (lambda _ | |
1114 | (chdir "projects/unix"))) | |
1115 | ;; XXX Should be unnecessary with the next release. | |
1116 | (add-before | |
1117 | 'build 'use-sdl2 | |
1118 | (lambda _ | |
1119 | (substitute* "Makefile" | |
1120 | (("SDL_CONFIG = (.*)sdl-config" all prefix) | |
1121 | (string-append "SDL_CONFIG = " prefix "sdl2-config")))))) | |
1122 | #:make-flags | |
1123 | (let ((out (assoc-ref %outputs "out")) | |
1124 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
1125 | (list "all" | |
1126 | (string-append "PREFIX=" out) | |
1127 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
1128 | ;; There are no tests. | |
1129 | #:tests? #f)) | |
d1e63866 | 1130 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
1131 | (synopsis "Mupen64Plus Rice Video plugin") |
1132 | (description | |
1133 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
1134 | which is capable of accurately playing many games. This package contains the | |
1135 | Glide64 video plugin.") | |
1136 | (license license:gpl2+))) | |
1137 | ||
1138 | (define-public mupen64plus-video-glide64mk2 | |
1139 | (package | |
1140 | (name "mupen64plus-video-glide64mk2") | |
1141 | (version "2.5") | |
1142 | (source | |
1143 | (origin | |
e5e7a167 TGR |
1144 | (method git-fetch) |
1145 | (uri (git-reference | |
b0e7b699 | 1146 | (url "https://github.com/mupen64plus/mupen64plus-video-glide64mk2") |
e5e7a167 TGR |
1147 | (commit version))) |
1148 | (file-name (git-file-name name version)) | |
9af704c5 | 1149 | (sha256 |
e5e7a167 | 1150 | (base32 "08pm28a36dpr0cvr8pzw0n5ksdazp7jqvlmqfy2lwb4dm0cwhkqd")))) |
9af704c5 RH |
1151 | (build-system gnu-build-system) |
1152 | (native-inputs | |
8394619b | 1153 | (list pkg-config which)) |
9af704c5 | 1154 | (inputs |
8394619b LC |
1155 | (list boost |
1156 | libpng | |
1157 | mesa | |
1158 | mupen64plus-core | |
1159 | sdl2 | |
1160 | zlib)) | |
9af704c5 RH |
1161 | (arguments |
1162 | '(#:phases | |
1163 | (modify-phases %standard-phases | |
1164 | ;; The mupen64plus build system has no configure phase. | |
1165 | (delete 'configure) | |
1166 | ;; Makefile is in a subdirectory. | |
1167 | (add-before | |
1168 | 'build 'cd-to-project-dir | |
1169 | (lambda _ | |
1170 | (chdir "projects/unix")))) | |
1171 | #:make-flags | |
1172 | (let ((out (assoc-ref %outputs "out")) | |
1173 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
1174 | (list "all" | |
1175 | (string-append "PREFIX=" out) | |
1176 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
1177 | ;; There are no tests. | |
1178 | #:tests? #f)) | |
84532c2b | 1179 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
1180 | (synopsis "Mupen64Plus Rice Video plugin") |
1181 | (description | |
1182 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
1183 | which is capable of accurately playing many games. This package contains the | |
1184 | Glide64MK2 video plugin.") | |
1185 | (license license:gpl2+))) | |
1186 | ||
1187 | (define-public mupen64plus-video-rice | |
1188 | (package | |
1189 | (name "mupen64plus-video-rice") | |
1190 | (version "2.5") | |
1191 | (source | |
1192 | (origin | |
d42d0a0b TGR |
1193 | (method git-fetch) |
1194 | (uri (git-reference | |
b0e7b699 | 1195 | (url "https://github.com/mupen64plus/mupen64plus-video-rice") |
d42d0a0b TGR |
1196 | (commit version))) |
1197 | (file-name (git-file-name name version)) | |
9af704c5 | 1198 | (sha256 |
d42d0a0b | 1199 | (base32 "0rpmbcq67gsj5h5jjis146378qc1mskskvx20y1ikx59yhbamh13")))) |
9af704c5 RH |
1200 | (build-system gnu-build-system) |
1201 | (native-inputs | |
8394619b | 1202 | (list pkg-config which)) |
9af704c5 | 1203 | (inputs |
8394619b | 1204 | (list libpng mesa mupen64plus-core sdl2)) |
9af704c5 RH |
1205 | (arguments |
1206 | '(#:phases | |
1207 | (modify-phases %standard-phases | |
1208 | ;; The mupen64plus build system has no configure phase. | |
1209 | (delete 'configure) | |
1210 | ;; Makefile is in a subdirectory. | |
1211 | (add-before | |
1212 | 'build 'cd-to-project-dir | |
1213 | (lambda _ | |
1214 | (chdir "projects/unix")))) | |
1215 | #:make-flags | |
1216 | (let ((out (assoc-ref %outputs "out")) | |
1217 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
1218 | (list "all" | |
1219 | (string-append "PREFIX=" out) | |
1220 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
1221 | ;; There are no tests. | |
1222 | #:tests? #f)) | |
b21acd21 | 1223 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
1224 | (synopsis "Mupen64Plus Rice Video plugin") |
1225 | (description | |
1226 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
1227 | which is capable of accurately playing many games. This package contains the | |
1228 | Rice Video plugin.") | |
1229 | (license license:gpl2+))) | |
1230 | ||
1231 | (define-public mupen64plus-video-z64 | |
1232 | (package | |
1233 | (name "mupen64plus-video-z64") | |
1234 | (version "2.0.0") | |
1235 | (source | |
1236 | (origin | |
85baeb20 TGR |
1237 | (method git-fetch) |
1238 | (uri (git-reference | |
b0e7b699 | 1239 | (url "https://github.com/mupen64plus/mupen64plus-video-z64") |
85baeb20 TGR |
1240 | (commit version))) |
1241 | (file-name (git-file-name name version)) | |
9af704c5 | 1242 | (sha256 |
85baeb20 | 1243 | (base32 "04qa2fdd6dakpk2v0d4l80xh9b4h8gm71g80c0wyyxdhmhwk1r9c")) |
fdb61400 | 1244 | (patches (search-patches "mupen64plus-video-z64-glew-correct-path.patch")))) |
9af704c5 RH |
1245 | (build-system gnu-build-system) |
1246 | (native-inputs | |
8394619b | 1247 | (list pkg-config which)) |
9af704c5 | 1248 | (inputs |
8394619b | 1249 | (list glew mupen64plus-core sdl2)) |
9af704c5 RH |
1250 | (arguments |
1251 | '(#:phases | |
1252 | (modify-phases %standard-phases | |
1253 | ;; The mupen64plus build system has no configure phase. | |
1254 | (delete 'configure) | |
1255 | ;; Makefile is in a subdirectory. | |
1256 | (add-before | |
1257 | 'build 'cd-to-project-dir | |
1258 | (lambda _ | |
1259 | (chdir "projects/unix"))) | |
1260 | ;; XXX Should be unnecessary with the next release. | |
1261 | (add-before | |
1262 | 'build 'use-sdl2 | |
1263 | (lambda _ | |
1264 | (substitute* "Makefile" | |
1265 | (("SDL_CONFIG = (.*)sdl-config" all prefix) | |
1266 | (string-append "SDL_CONFIG = " prefix "sdl2-config")))))) | |
1267 | #:make-flags | |
1268 | (let ((out (assoc-ref %outputs "out")) | |
1269 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
1270 | (list "all" | |
1271 | (string-append "PREFIX=" out) | |
1272 | (string-append "APIDIR=" m64p "/include/mupen64plus"))) | |
1273 | ;; There are no tests. | |
1274 | #:tests? #f)) | |
26daadb9 | 1275 | (home-page "https://www.mupen64plus.org/") |
9af704c5 RH |
1276 | (synopsis "Mupen64Plus Z64 video plugin") |
1277 | (description | |
1278 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
1279 | which is capable of accurately playing many games. This package contains the | |
1280 | Z64 video plugin.") | |
1281 | (license license:gpl2+))) | |
1282 | ||
1283 | (define-public mupen64plus-ui-console | |
1284 | (package | |
1285 | (name "mupen64plus-ui-console") | |
1286 | (version "2.5") | |
1287 | (source | |
1288 | (origin | |
225157a0 TGR |
1289 | (method git-fetch) |
1290 | (uri (git-reference | |
b0e7b699 | 1291 | (url "https://github.com/mupen64plus/mupen64plus-ui-console") |
225157a0 TGR |
1292 | (commit version))) |
1293 | (file-name (git-file-name name version)) | |
9af704c5 | 1294 | (sha256 |
225157a0 | 1295 | (base32 "0vrf98qa6a0y3647kslsv644fag233dxh5dcr1yncjiiwickcr5a")) |
9af704c5 RH |
1296 | (patches (search-patches "mupen64plus-ui-console-notice.patch")))) |
1297 | (build-system gnu-build-system) | |
1298 | (native-inputs | |
8394619b | 1299 | (list pkg-config which)) |
9af704c5 | 1300 | (inputs |
8394619b | 1301 | (list sdl2)) |
9af704c5 RH |
1302 | ;; Mupen64Plus supports a single data directory and a single plugin |
1303 | ;; directory in its configuration, yet we need data and plugin files from | |
1304 | ;; a variety of packages. The best way to deal with this is to install | |
1305 | ;; all packages from which data and plugin files are needed into one's | |
1306 | ;; profile, and point the configuration there. Hence, propagate the most | |
1307 | ;; important packages here to save the user from the bother. The patch | |
1308 | ;; mupen64plus-ui-console-notice also gives users instructions on what | |
1309 | ;; they need to do in order to point the configuration to their profile. | |
1310 | (propagated-inputs | |
8394619b LC |
1311 | (list mupen64plus-core |
1312 | mupen64plus-audio-sdl | |
1313 | mupen64plus-input-sdl | |
1314 | mupen64plus-rsp-hle | |
1315 | mupen64plus-video-glide64 | |
1316 | mupen64plus-video-glide64mk2 | |
1317 | mupen64plus-video-rice)) | |
9af704c5 RH |
1318 | (arguments |
1319 | '(#:phases | |
1320 | (modify-phases %standard-phases | |
1321 | ;; The mupen64plus build system has no configure phase. | |
1322 | (delete 'configure) | |
1323 | ;; Makefile is in a subdirectory. | |
1324 | (add-before | |
1325 | 'build 'cd-to-project-dir | |
1326 | (lambda _ | |
1327 | (chdir "projects/unix")))) | |
1328 | #:make-flags | |
1329 | (let ((out (assoc-ref %outputs "out")) | |
1330 | (m64p (assoc-ref %build-inputs "mupen64plus-core"))) | |
1331 | (list "all" | |
1332 | (string-append "PREFIX=" out) | |
1333 | (string-append "APIDIR=" m64p "/include/mupen64plus") | |
1334 | ;; Trailing slash matters here. | |
1335 | (string-append "COREDIR=" m64p "/lib/"))) | |
1336 | ;; There are no tests. | |
1337 | #:tests? #f)) | |
e8079ba4 | 1338 | (home-page "https://www.mupen64plus.org/") |
ff452bea | 1339 | (synopsis "Mupen64Plus command line user interface") |
9af704c5 RH |
1340 | (description |
1341 | "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator | |
1342 | which is capable of accurately playing many games. This package contains the | |
1343 | command line user interface. Installing this package is the easiest way | |
1344 | towards a working Mupen64Plus for casual users.") | |
1345 | (license license:gpl2+))) | |
1346 | ||
1347 | (define-public nestopia-ue | |
1348 | (package | |
1349 | (name "nestopia-ue") | |
6f483f8d | 1350 | (version "1.51.1") |
3e461b71 TGR |
1351 | (source |
1352 | (origin | |
1353 | (method git-fetch) | |
1354 | (uri (git-reference | |
b0e7b699 | 1355 | (url "https://github.com/rdanbrook/nestopia") |
3e461b71 TGR |
1356 | (commit version))) |
1357 | (file-name (git-file-name name version)) | |
1358 | (sha256 | |
6f483f8d FG |
1359 | (base32 "1g19gz33jav00rwzkpcnynf5ps41vl64a9qx0xjd6lva4bgn8s57")))) |
1360 | (build-system gnu-build-system) | |
9af704c5 | 1361 | (native-inputs |
8394619b | 1362 | (list autoconf autoconf-archive automake pkg-config)) |
9af704c5 | 1363 | (inputs |
6f483f8d | 1364 | `(("fltk" ,fltk) |
72298df7 | 1365 | ("fontconfig" ,fontconfig) |
9af704c5 | 1366 | ("libarchive" ,libarchive) |
9d39c300 | 1367 | ("libepoxy" ,libepoxy) |
6f483f8d FG |
1368 | ("libxft" ,libxft) |
1369 | ("libxrender" ,libxrender) | |
9af704c5 RH |
1370 | ("sdl2" ,sdl2) |
1371 | ("zlib" ,zlib))) | |
1372 | (arguments | |
6f483f8d | 1373 | '(;; There are no tests. |
9af704c5 RH |
1374 | #:tests? #f)) |
1375 | (home-page "http://0ldsk00l.ca/nestopia/") | |
1376 | (synopsis "Nintendo Entertainment System (NES/Famicom) emulator") | |
1377 | (description | |
1378 | "Nestopia UE (Undead Edition) is a fork of the Nintendo Entertainment | |
1379 | System (NES/Famicom) emulator Nestopia, with enhancements from members of the | |
1380 | emulation community. It provides highly accurate emulation.") | |
1381 | (license license:gpl2+))) | |
1382 | ||
d4d0a155 | 1383 | (define-public libretro-lowresnx |
06097131 SB |
1384 | (package |
1385 | (name "libretro-lowresnx") | |
1386 | (version "1.2") | |
1387 | (source (origin | |
1388 | (method git-fetch) | |
1389 | (uri (git-reference | |
1390 | (url "https://github.com/timoinutilis/lowres-nx") | |
1391 | (commit (string-append "v" version)))) | |
1392 | (file-name (git-file-name name version)) | |
1393 | (sha256 | |
1394 | (base32 | |
1395 | "0b0vg3iz342dpkffvf7frsnqh8inj8yzi8550bsx8vnbpq5r2ay5")))) | |
1396 | (build-system gnu-build-system) | |
1397 | (arguments | |
1398 | `(#:tests? #f ; no tests | |
1399 | #:make-flags (list "-C" "platform/LibRetro" | |
1400 | (string-append "CC=" ,(cc-for-target))) | |
1401 | #:phases | |
1402 | (modify-phases %standard-phases | |
1403 | (delete 'configure) ; no configure script | |
1404 | (replace 'install | |
1405 | (lambda* (#:key outputs #:allow-other-keys) | |
1406 | (let* ((out (assoc-ref outputs "out")) | |
1407 | (libretrodir (string-append out "/lib/libretro"))) | |
1408 | (install-file "platform/LibRetro/lowresnx_libretro.so" | |
1409 | libretrodir) | |
1410 | #t)))))) | |
1411 | (home-page "https://lowresnx.inutilis.com/") | |
1412 | (synopsis "Libretro core for LowRES NX") | |
1413 | (description "LowRES NX is a simulated retro game console, which can be | |
d4d0a155 SB |
1414 | programmed in the classic BASIC language. This package provides a libretro |
1415 | core allowing the lowRES NX programs to be used with libretro frontends such | |
1416 | as RetroArch.") | |
06097131 | 1417 | (license license:zlib))) |
d4d0a155 | 1418 | |
9af704c5 RH |
1419 | (define-public retroarch |
1420 | (package | |
1421 | (name "retroarch") | |
e2a021a7 | 1422 | (version "1.9.11") |
9af704c5 RH |
1423 | (source |
1424 | (origin | |
1fc346de TGR |
1425 | (method git-fetch) |
1426 | (uri (git-reference | |
b0e7b699 | 1427 | (url "https://github.com/libretro/RetroArch") |
1fc346de TGR |
1428 | (commit (string-append "v" version)))) |
1429 | (file-name (git-file-name name version)) | |
9af704c5 | 1430 | (sha256 |
e2a021a7 | 1431 | (base32 "0hd77kw1f655s40qcz1righdhd9czqyy40rf7gigdag1bkchdx6z")) |
77549754 | 1432 | (patches |
9c30f26b | 1433 | (search-patches "retroarch-LIBRETRO_DIRECTORY.patch")))) |
9af704c5 RH |
1434 | (build-system gnu-build-system) |
1435 | (arguments | |
f21967a4 | 1436 | `(#:tests? #f ; no tests |
9af704c5 RH |
1437 | #:phases |
1438 | (modify-phases %standard-phases | |
1439 | (replace 'configure | |
1440 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1441 | (let* ((out (assoc-ref outputs "out")) | |
1442 | (etc (string-append out "/etc")) | |
12a3abc6 RH |
1443 | (vulkan (assoc-ref inputs "vulkan-loader")) |
1444 | (wayland-protocols (assoc-ref inputs "wayland-protocols"))) | |
77549754 | 1445 | ;; Hard-code some store file names. |
9af704c5 RH |
1446 | (substitute* "gfx/common/vulkan_common.c" |
1447 | (("libvulkan.so") (string-append vulkan "/lib/libvulkan.so"))) | |
12a3abc6 RH |
1448 | (substitute* "gfx/common/wayland/generate_wayland_protos.sh" |
1449 | (("/usr/local/share/wayland-protocols") | |
1450 | (string-append wayland-protocols "/share/wayland-protocols"))) | |
9af704c5 RH |
1451 | (substitute* "qb/qb.libs.sh" |
1452 | (("/bin/true") (which "true"))) | |
77549754 | 1453 | |
fade67ab EF |
1454 | ;; Use shared zlib. |
1455 | (substitute* '("libretro-common/file/archive_file_zlib.c" | |
e85bb00c | 1456 | "libretro-common/streams/trans_stream_zlib.c") |
fade67ab | 1457 | (("<compat/zlib.h>") "<zlib.h>")) |
77549754 | 1458 | |
9af704c5 RH |
1459 | ;; The configure script does not yet accept the extra arguments |
1460 | ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase. | |
f21967a4 EF |
1461 | (invoke |
1462 | "./configure" | |
1463 | ,@(if (string-prefix? "armhf" (or (%current-target-system) | |
1464 | (%current-system))) | |
1465 | '("--enable-neon" "--enable-floathard") | |
1466 | '()) | |
1467 | (string-append "--prefix=" out) | |
9c30f26b SB |
1468 | ;; Non-free software are available through the core updater, |
1469 | ;; disable it. See <https://issues.guix.gnu.org/38360>. | |
1470 | "--disable-update_cores" | |
73dd0654 | 1471 | "--disable-builtinminiupnpc"))))))) |
9af704c5 RH |
1472 | (inputs |
1473 | `(("alsa-lib" ,alsa-lib) | |
1474 | ("ffmpeg" ,ffmpeg) | |
1475 | ("freetype" ,freetype) | |
1476 | ("libxinerama" ,libxinerama) | |
1477 | ("libxkbcommon" ,libxkbcommon) | |
1478 | ("libxml2" ,libxml2) | |
45267af1 | 1479 | ("libxrandr" ,libxrandr) |
9af704c5 RH |
1480 | ("libxv" ,libxv) |
1481 | ("mesa" ,mesa) | |
73dd0654 | 1482 | ("miniupnpc" ,miniupnpc) |
9af704c5 RH |
1483 | ("openal" ,openal) |
1484 | ("pulseaudio" ,pulseaudio) | |
1485 | ("python" ,python) | |
ea0a5107 | 1486 | ("qtbase" ,qtbase-5) |
9af704c5 RH |
1487 | ("sdl" ,sdl2) |
1488 | ("udev" ,eudev) | |
e6fcf903 | 1489 | ("vulkan-loader" ,vulkan-loader) |
c695fb76 | 1490 | ("wayland" ,wayland) |
9af704c5 RH |
1491 | ("zlib" ,zlib))) |
1492 | (native-inputs | |
8394619b | 1493 | (list pkg-config wayland-protocols which)) |
9c30f26b SB |
1494 | (native-search-paths |
1495 | (list (search-path-specification | |
1496 | (variable "LIBRETRO_DIRECTORY") | |
1497 | (separator #f) ; single entry | |
1498 | (files '("lib/libretro"))))) | |
9af704c5 RH |
1499 | (home-page "https://www.libretro.com/") |
1500 | (synopsis "Reference frontend for the libretro API") | |
1501 | (description | |
1502 | "Libretro is a simple but powerful development interface that allows for | |
1503 | the easy creation of emulators, games and multimedia applications that can plug | |
1504 | straight into any libretro-compatible frontend. RetroArch is the official | |
1505 | reference frontend for the libretro API, currently used by most as a modular | |
1506 | multi-system game/emulator system.") | |
1507 | (license license:gpl3+))) | |
4c40ed9d NG |
1508 | |
1509 | (define-public scummvm | |
1510 | (package | |
1511 | (name "scummvm") | |
e598e2a5 | 1512 | (version "2.6.1") |
4c40ed9d NG |
1513 | (source |
1514 | (origin | |
1515 | (method url-fetch) | |
53cd301b | 1516 | (uri (string-append "https://downloads.scummvm.org/frs/scummvm/" version |
4c40ed9d NG |
1517 | "/scummvm-" version ".tar.xz")) |
1518 | (sha256 | |
e598e2a5 | 1519 | (base32 "1s8psdn3a3hqvvfgmlfxrqqdw8hbr0zyrvirzsnzh6yxmgpvkbwg")))) |
4c40ed9d NG |
1520 | (build-system gnu-build-system) |
1521 | (arguments | |
e39b4902 NG |
1522 | (list |
1523 | #:tests? #f ;require "git" | |
1524 | #:configure-flags #~(list "--enable-release") ;for optimizations | |
1525 | #:phases | |
1526 | #~(modify-phases %standard-phases | |
1527 | (replace 'configure | |
1528 | ;; configure does not work followed by both "SHELL=..." and | |
1529 | ;; "CONFIG_SHELL=..."; set environment variables instead | |
1530 | (lambda* (#:key inputs configure-flags #:allow-other-keys) | |
1531 | (let ((bash (search-input-file inputs "/bin/bash")) | |
1532 | (flags `(,(string-append "--prefix=" #$output) | |
4c40ed9d | 1533 | ,@configure-flags))) |
e39b4902 NG |
1534 | (setenv "SHELL" bash) |
1535 | (setenv "CONFIG_SHELL" bash) | |
1536 | (apply invoke "./configure" flags))))))) | |
4c40ed9d | 1537 | (native-inputs |
8394619b | 1538 | (list nasm pkg-config)) |
4c40ed9d | 1539 | (inputs |
bb59fec2 NG |
1540 | (list alsa-lib |
1541 | faad2 | |
1542 | fluidsynth | |
1543 | freetype | |
1544 | fribidi | |
1545 | glew | |
1546 | giflib | |
1547 | liba52 | |
1548 | flac | |
1549 | libjpeg-turbo | |
1550 | libmad | |
1551 | libmpeg2 | |
1552 | libogg | |
1553 | libpng | |
1554 | libtheora | |
1555 | libvorbis | |
1556 | (sdl-union (list sdl2 sdl2-net)) | |
1557 | zlib)) | |
4c40ed9d NG |
1558 | (home-page "https://www.scummvm.org/") |
1559 | (synopsis "Engine for several graphical adventure games") | |
1560 | (description "ScummVM is a program which allows you to run certain | |
1561 | classic graphical point-and-click adventure games, provided you | |
1562 | already have their data files. The clever part about this: ScummVM | |
1563 | just replaces the executables shipped with the games, allowing you to | |
1564 | play them on systems for which they were never designed!") | |
1565 | (license license:gpl2+))) | |
c8b2fd28 | 1566 | |
45c58518 CH |
1567 | (define-public libticables2 |
1568 | (package | |
1569 | (name "libticables2") | |
1570 | (version "1.3.5") | |
1571 | (source (origin | |
1572 | (method url-fetch) | |
1573 | (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz") | |
1574 | (sha256 | |
1575 | (base32 | |
1576 | "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg")))) | |
1577 | (build-system gnu-build-system) | |
1578 | (arguments | |
1579 | `(#:configure-flags (list "--enable-libusb10") | |
1580 | #:phases | |
1581 | (modify-phases %standard-phases | |
1582 | (replace 'unpack | |
1583 | (lambda* (#:key source #:allow-other-keys) | |
1584 | (invoke "tar" "xvkf" source) | |
1585 | (invoke "tar" "xvkf" | |
1586 | (string-append "tilibs2/libticables2-" | |
1587 | ,version ".tar.bz2")) | |
1588 | (chdir (string-append "libticables2-" ,version)) | |
1589 | #t))))) | |
1590 | (native-inputs | |
8394619b LC |
1591 | (list autoconf |
1592 | autogen | |
1593 | automake | |
1594 | gnu-gettext | |
1595 | libtool | |
1596 | pkg-config)) | |
45c58518 | 1597 | (inputs |
8394619b | 1598 | (list glib libusb)) |
45c58518 CH |
1599 | (synopsis "Link cable library for TI calculators") |
1600 | (description | |
1601 | "This package contains libticables, a library for operations on | |
1602 | @acronym{TI, Texas Instruments} calculator link cables. | |
1603 | ||
98ff729e CH |
1604 | This is a part of the TiLP project.") |
1605 | (home-page "http://lpg.ticalc.org/prj_tilp/") | |
1606 | (license license:gpl2+))) | |
1607 | ||
1608 | (define-public libticonv | |
1609 | (package | |
1610 | (name "libticonv") | |
1611 | (version "1.1.5") | |
1612 | (source (origin | |
1613 | (method url-fetch) | |
1614 | (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz") | |
1615 | (sha256 | |
1616 | (base32 | |
1617 | "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg")))) | |
1618 | (build-system gnu-build-system) | |
1619 | (arguments | |
1620 | ;; build fails with out --enable-iconv (...?) | |
1621 | `(#:configure-flags (list "--enable-iconv") | |
1622 | #:phases | |
1623 | (modify-phases %standard-phases | |
1624 | (replace 'unpack | |
1625 | (lambda* (#:key source #:allow-other-keys) | |
1626 | (invoke "tar" "xvkf" source) | |
1627 | (invoke "tar" "xvkf" | |
1628 | (string-append "tilibs2/libticonv-" | |
1629 | ,version ".tar.bz2")) | |
1630 | (chdir (string-append "libticonv-" ,version)) | |
1631 | #t))))) | |
1632 | (native-inputs | |
8394619b | 1633 | (list autoconf automake libtool pkg-config)) |
98ff729e | 1634 | (inputs |
8394619b | 1635 | (list glib)) |
98ff729e CH |
1636 | (synopsis "Character conversion library for TI calculators") |
1637 | (description | |
1638 | "This package contains libticonv, a library to support working with | |
1639 | @acronym{TI, Texas Instruments} calculator charsets. | |
1640 | ||
b823d4ed CH |
1641 | This is a part of the TiLP project.") |
1642 | (home-page "http://lpg.ticalc.org/prj_tilp/") | |
1643 | (license license:gpl2+))) | |
1644 | ||
1645 | (define-public libtifiles2 | |
1646 | (package | |
1647 | (name "libtifiles2") | |
1648 | (version "1.1.7") | |
1649 | (source (origin | |
1650 | (method url-fetch) | |
1651 | (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz") | |
1652 | (sha256 | |
1653 | (base32 | |
1654 | "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg")))) | |
1655 | (build-system gnu-build-system) | |
1656 | (arguments | |
1657 | `(#:phases | |
1658 | (modify-phases %standard-phases | |
1659 | (replace 'unpack | |
1660 | (lambda* (#:key source #:allow-other-keys) | |
1661 | (invoke "tar" "xvkf" source) | |
1662 | (invoke "tar" "xvkf" | |
1663 | (string-append "tilibs2/libtifiles2-" | |
1664 | ,version ".tar.bz2")) | |
1665 | (chdir (string-append "libtifiles2-" ,version)) | |
1666 | #t))))) | |
1667 | (native-inputs | |
8394619b | 1668 | (list autoconf automake gnu-gettext libtool pkg-config)) |
b823d4ed | 1669 | (inputs |
8394619b | 1670 | (list glib libarchive libticonv)) |
b823d4ed CH |
1671 | (synopsis "File functions library for TI calculators") |
1672 | (description | |
1673 | "This package contains libticonv, a library to support working with | |
1674 | @acronym{TI, Texas Instruments} calculator files. | |
1675 | ||
e5bbb466 CH |
1676 | This is a part of the TiLP project.") |
1677 | (home-page "http://lpg.ticalc.org/prj_tilp/") | |
1678 | (license license:gpl2+))) | |
1679 | ||
1680 | (define-public libticalcs2 | |
1681 | (package | |
1682 | (name "libticalcs2") | |
1683 | (version "1.1.9") | |
1684 | (source (origin | |
1685 | (method url-fetch) | |
1686 | (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz") | |
1687 | (sha256 | |
1688 | (base32 | |
1689 | "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg")))) | |
1690 | (build-system gnu-build-system) | |
1691 | (arguments | |
1692 | `(#:phases | |
1693 | (modify-phases %standard-phases | |
1694 | (replace 'unpack | |
1695 | (lambda* (#:key source #:allow-other-keys) | |
1696 | (invoke "tar" "xvkf" source) | |
1697 | (invoke "tar" "xvkf" | |
1698 | (string-append "tilibs2/libticalcs2-" | |
1699 | ,version ".tar.bz2")) | |
1700 | (chdir (string-append "libticalcs2-" ,version)) | |
1701 | #t))))) | |
1702 | (native-inputs | |
8394619b | 1703 | (list autoconf automake gnu-gettext libtool pkg-config)) |
e5bbb466 | 1704 | (inputs |
8394619b | 1705 | (list glib libarchive libticables2 libticonv libtifiles2)) |
e5bbb466 CH |
1706 | (synopsis "Support library for TI calculators") |
1707 | (description | |
1708 | "This project aims to develop a multi-platform linking program for use | |
1709 | with all @acronym{TI, Texas Instruments} graphing calculators (TI73 to | |
1710 | V200PLT). | |
1711 | ||
45c58518 CH |
1712 | This is a part of the TiLP project.") |
1713 | (home-page "http://lpg.ticalc.org/prj_tilp/") | |
1714 | (license license:gpl2+))) | |
1715 | ||
c8b2fd28 NG |
1716 | (define-public mame |
1717 | (package | |
1718 | (name "mame") | |
8cc2061b | 1719 | (version "0.245") |
c8b2fd28 NG |
1720 | (source |
1721 | (origin | |
1722 | (method git-fetch) | |
1723 | (uri (git-reference | |
b0e7b699 | 1724 | (url "https://github.com/mamedev/mame") |
c8b2fd28 NG |
1725 | (commit (apply string-append "mame" (string-split version #\.))))) |
1726 | (file-name (git-file-name name version)) | |
1727 | (sha256 | |
8cc2061b | 1728 | (base32 "1w34hcvnibnz0xaydh2kdciffng07zins9lnrv041fmzlk4318qb")) |
c8b2fd28 NG |
1729 | (modules '((guix build utils))) |
1730 | (snippet | |
1731 | ;; Remove bundled libraries. | |
1732 | '(begin | |
1733 | (with-directory-excursion "3rdparty" | |
1734 | (for-each delete-file-recursively | |
1735 | '("asio" "expat" "glm" "libflac" "libjpeg" "lua" | |
1736 | "portaudio" "portmidi" "pugixml" "rapidjson" "SDL2" | |
87b409d7 | 1737 | "SDL2-override" "sqlite3" "utf8proc" "zlib"))))))) |
c8b2fd28 NG |
1738 | (build-system gnu-build-system) |
1739 | (arguments | |
2f5b5294 NG |
1740 | (list |
1741 | #:make-flags | |
1742 | #~(cons* | |
1743 | ;; A 'strict-overflow' error pops up on i686 so disable '-Werror'. | |
1744 | "NOWERROR=1" | |
c7dd51dd | 1745 | (string-append "QT_HOME=" #$(this-package-input "qtbase")) |
2f5b5294 NG |
1746 | (string-append "SDL_INI_PATH=" #$output "/share/mame/ini") |
1747 | (map (lambda (lib) | |
1748 | (string-append "USE_SYSTEM_LIB_" (string-upcase lib) "=1")) | |
1749 | '("asio" "expat" "flac" "glm" "jpeg" "lua" "portaudio" "portmidi" | |
1750 | "pugixml" "rapidjson" "sqlite3" "utf8proc" "zlib"))) | |
1751 | #:tests? #f ;no test in regular release | |
1752 | #:phases | |
89d928f4 NG |
1753 | #~(modify-phases %standard-phases |
1754 | (delete 'configure) | |
1755 | (add-after 'build 'build-documentation | |
1756 | (lambda _ (invoke "make" "-C" "docs" "man" "info"))) | |
1757 | (replace 'install | |
1758 | ;; Upstream does not provide an installation phase. | |
1759 | (lambda _ | |
1760 | (let ((share (string-append #$output "/share/mame"))) | |
1761 | ;; Install data. | |
1762 | (for-each (lambda (dir) | |
1763 | (copy-recursively dir (string-append share "/" dir))) | |
1764 | '("artwork" "bgfx" "ctrlr" "hash" "ini" "language" | |
1765 | "plugins" "samples")) | |
1766 | (let ((keymaps (string-append share "/keymaps"))) | |
1767 | (for-each (lambda (file) (install-file file keymaps)) | |
1768 | (find-files "keymaps" ".*LINUX\\.map"))) | |
1769 | (let ((fonts (string-append share "/fonts"))) | |
1770 | (install-file "uismall.bdf" fonts)) | |
1771 | (when (file-exists? "mame64") | |
1772 | (rename-file "mame64" "mame")) | |
1773 | (install-file "mame" (string-append #$output "/bin"))))) | |
1774 | (add-after 'install 'install-documentation | |
1775 | (lambda _ | |
1776 | (let ((man (string-append #$output "/share/man/man1")) | |
1777 | (info (string-append #$output "/share/info"))) | |
1778 | (install-file "docs/build/man/MAME.1" man) | |
1779 | (install-file "docs/build/texinfo/MAME.info" info)))) | |
1780 | (add-after 'install 'install-ini-file | |
1781 | ;; Generate an ini file so as to set some directories (e.g., roms) | |
1782 | ;; to a writable location, i.e., "$HOME/.mame/" and "$HOME/mame/". | |
1783 | ;; | |
1784 | ;; XXX: We need to insert absolute references to the store. It can | |
1785 | ;; be an issue if they leak into user's home directory, e.g., with | |
1786 | ;; "mame -createconfig" and the package is later GC'ed. | |
1787 | (lambda _ | |
1788 | (let* ((share (string-append #$output "/share/mame")) | |
1789 | (ini (string-append share "/ini"))) | |
1790 | (with-output-to-file (string-append ini "/mame.ini") | |
1791 | (lambda _ | |
1792 | (format #t | |
1793 | "inipath $HOME/.mame;~a/ini~@ | |
c8b2fd28 NG |
1794 | homepath $HOME/mame~@ |
1795 | rompath $HOME/mame/roms~@ | |
1796 | samplepath $HOME/mame/samples;~a/samples~@ | |
1797 | cheatpath $HOME/mame/cheat~@ | |
1798 | artpath $HOME/mame/artwork;~a/artwork~@ | |
1799 | crosshairpath $HOME/mame/crosshair~@ | |
1800 | snapshot_directory $HOME/mame/snapshots~@ | |
1801 | hashpath ~a/hash~@ | |
1802 | fontpath $HOME/mame/fonts;~a/fonts~@ | |
1803 | ctrlrpath $HOME/mame/ctrlr;~a/ctrlr~@ | |
1804 | bgfx_path ~a/bgfx~@ | |
1805 | pluginspath $HOME/mame/plugins;~a/plugins~@ | |
1806 | languagepath ~a/language~@ | |
1807 | cfg_directory $HOME/.mame/cfg~@ | |
1808 | nvram_directory $HOME/.mame/nvram~@ | |
1809 | input_directory $HOME/.mame/inp~@ | |
1810 | state_directory $HOME/.mame/sta~@ | |
1811 | diff_directory $HOME/.mame/diff~@ | |
1812 | comment_directory $HOME/.mame/comments~%" | |
89d928f4 NG |
1813 | share share share share share share share share |
1814 | share))) | |
1815 | (with-output-to-file (string-append ini "/ui.ini") | |
1816 | (lambda _ | |
1817 | (format #t | |
1818 | "historypath $HOME/mame/history~@ | |
c8b2fd28 NG |
1819 | categorypath $HOME/mame/folders~@ |
1820 | cabinets_directory $HOME/mame/cabinets~@ | |
1821 | cpanels_directory $HOME/mame/cpanel~@ | |
1822 | pcbs_directory $HOME/mame/pcb~@ | |
1823 | flyers_directory $HOME/mame/flyers~@ | |
1824 | titles_directory $HOME/mame/titles~@ | |
1825 | ends_directory $HOME/mame/ends~@ | |
1826 | marquees_directory $HOME/mame/marquees~@ | |
1827 | artwork_preview_directory $HOME/mame/artpreview~@ | |
1828 | bosses_directory $HOME/mame/bosses~@ | |
1829 | logos_directory $HOME/mame/logo~@ | |
1830 | scores_directory $HOME/mame/scores~@ | |
1831 | versus_directory $HOME/mame/versus~@ | |
1832 | gameover_directory $HOME/mame/gameover~@ | |
1833 | howto_directory $HOME/mame/howto~@ | |
1834 | select_directory $HOME/mame/select~@ | |
1835 | icons_directory $HOME/mame/icons~@ | |
1836 | covers_directory $HOME/mame/covers~@ | |
87b409d7 | 1837 | ui_path $HOME/.mame/ui~%")))))) |
89d928f4 NG |
1838 | (add-after 'install 'install-desktop-file |
1839 | (lambda _ | |
1840 | (let ((desktop (string-append #$output "/share/applications")) | |
1841 | (executable (string-append #$output "/bin/mame"))) | |
1842 | (mkdir-p desktop) | |
1843 | (with-output-to-file (string-append desktop "/mame.desktop") | |
1844 | (lambda _ | |
1845 | (format #t | |
1846 | "[Desktop Entry]~@ | |
c8b2fd28 NG |
1847 | Name=mame~@ |
1848 | Comment=Multi-purpose emulation framework~@ | |
1849 | Exec=~a~@ | |
1850 | TryExec=~@*~a~@ | |
1851 | Terminal=false~@ | |
1852 | Type=Application~@ | |
1853 | Categories=Game;Emulator;~@ | |
1854 | Keywords=Game;Emulator;Arcade;~%" | |
89d928f4 | 1855 | executable))))))))) |
c8b2fd28 | 1856 | (native-inputs |
2f5b5294 NG |
1857 | (list pkg-config |
1858 | python-sphinx | |
1859 | python-sphinxcontrib-svg2pdfconverter | |
1860 | texinfo)) | |
c8b2fd28 | 1861 | (inputs |
2f5b5294 NG |
1862 | (list alsa-lib |
1863 | asio | |
1864 | expat | |
1865 | flac | |
1866 | fontconfig | |
1867 | glm | |
1868 | libjpeg-turbo | |
1869 | libxi | |
1870 | libxinerama | |
1871 | lua | |
1872 | portaudio | |
1873 | portmidi | |
1874 | pugixml | |
1875 | pulseaudio | |
1876 | python-wrapper | |
1877 | qtbase-5 | |
1878 | rapidjson | |
1879 | (sdl-union (list sdl2 sdl2-ttf)) | |
1880 | sqlite | |
1881 | utf8proc | |
1882 | zlib)) | |
cf580e5e | 1883 | (home-page "https://www.mamedev.org") |
c8b2fd28 NG |
1884 | (synopsis "Multi-purpose emulation framework") |
1885 | (description "MAME's purpose is to preserve decades of software | |
1886 | history. As electronic technology continues to rush forward, MAME | |
1887 | prevents this important @emph{vintage} software from being lost and | |
1888 | forgotten. This is achieved by documenting the hardware and how it | |
1889 | functions. The source code to MAME serves as this documentation.") | |
1890 | ;; The MAME project as a whole is distributed under the terms of GPL2+. | |
1891 | ;; However, over 90% of the files are under Expat license. Also, artwork, | |
1892 | ;; keymaps, languages and samples are under CC0. | |
1893 | (license (list license:gpl2+ license:expat license:cc0)))) | |
1403e1f7 | 1894 | |
08d34100 PN |
1895 | (define-public gnome-arcade |
1896 | (package | |
1897 | (name "gnome-arcade") | |
325136b8 | 1898 | (version "0.240") |
08d34100 PN |
1899 | (source |
1900 | (origin | |
1901 | (method git-fetch) | |
1902 | (uri (git-reference | |
1903 | (url "https://github.com/strippato/gnome-arcade") | |
1904 | (commit (string-append "v." version)))) | |
1905 | (file-name (git-file-name name version)) | |
1906 | (sha256 | |
1907 | (base32 | |
325136b8 | 1908 | "110dpbbcj73s3i2zcnay0kdpsngcpq8mif88279pdc2967ld0a6r")))) |
08d34100 PN |
1909 | (build-system cmake-build-system) |
1910 | (arguments | |
3fe905eb NG |
1911 | (list |
1912 | #:tests? #f ; No tests. | |
1913 | #:configure-flags | |
1914 | #~(list | |
1915 | (string-append "-DMAME_BIN=\"" | |
1916 | #$(this-package-input "mame") | |
1917 | "/bin/mame\"") | |
1918 | (string-append "-DAPP_RES=\"" #$output "/share/gnome-arcade/\"")) | |
1919 | #:phases | |
1920 | #~(modify-phases %standard-phases | |
1921 | (add-before 'build 'fix-paths | |
1922 | (lambda _ | |
1923 | (substitute* "../source/src/config.c" | |
1924 | (("/usr/share") (string-append #$output "/share"))))) | |
1925 | (replace 'install | |
1926 | (lambda _ | |
1927 | (let ((bin (string-append #$output "/bin")) | |
1928 | (rom (string-append #$output | |
1929 | "/share/gnome-arcade/data/rom")) | |
1930 | (tile (string-append #$output | |
1931 | "/share/gnome-arcade/data/tile"))) | |
1932 | (mkdir-p bin) | |
1933 | (install-file "../gnome-arcade" bin) | |
1934 | (copy-recursively "../source/res" | |
1935 | (string-append #$output | |
1936 | "/share/gnome-arcade/res")) | |
1937 | (mkdir-p rom) | |
1938 | (install-file "../source/data/rom/ROM.TXT" rom) | |
1939 | (mkdir-p tile) | |
1940 | (install-file "../source/data/tile/TILE.TXT" tile))))))) | |
08d34100 | 1941 | (native-inputs |
8394619b | 1942 | (list pkg-config)) |
08d34100 | 1943 | (inputs |
3fe905eb | 1944 | (list gtk+ libarchive libevdev mame vlc)) |
08d34100 PN |
1945 | (home-page "https://github.com/strippato/gnome-arcade") |
1946 | (synopsis "Minimal MAME frontend") | |
1947 | (description | |
3fe905eb NG |
1948 | "Gnome Arcade is a minimal GTK+ frontend for MAME, the multi-purpose |
1949 | arcade and console emulator.") | |
08d34100 PN |
1950 | (license license:gpl3+))) |
1951 | ||
c723aa98 B |
1952 | (define-public gnusim8085 |
1953 | (package | |
1954 | (name "gnusim8085") | |
1955 | (version "1.4.1") | |
1956 | (source (origin | |
1957 | (method url-fetch) | |
1958 | (uri (string-append | |
1959 | "https://github.com/srid/GNUSim8085/releases/download/" | |
1960 | version "/gnusim8085-" version ".tar.gz")) | |
1961 | (sha256 | |
1962 | (base32 | |
1963 | "05x0is0ckagb3r74p6lw9b8nqrrh7q2v4jvc4cnhljchz9x7kw2a")))) | |
1964 | (native-inputs (list pkg-config)) | |
1965 | (inputs (list gtksourceview-3 adwaita-icon-theme)) | |
1966 | (build-system glib-or-gtk-build-system) | |
1967 | (home-page "https://gnusim8085.srid.ca") | |
1968 | (synopsis "Graphical simulator for the Intel 8085 microprocessor") | |
1969 | (description | |
1970 | "GNUSim8085 is a graphical simulator, | |
1971 | assembler, and debugger for the Intel 8085 microprocessor. | |
1972 | ||
1973 | @itemize | |
1974 | @item A simple editor component with syntax highlighting. | |
1975 | @item A keypad to input assembly language instructions with appropriate arguments. | |
1976 | @item Easy view of register contents. | |
1977 | @item Easy view of flag contents. | |
1978 | @item Hexadecimal/decimal converter. | |
1979 | @item View of stack, memory and I/O contents. | |
1980 | @item Support for breakpoints for program debugging. | |
1981 | @item Stepwise program execution. | |
1982 | @item One click conversion of assembly program to opcode listing. | |
1983 | @item Printing support. | |
1984 | @item UI translated in various languages. | |
1985 | @end itemize") | |
1986 | (license license:gpl2+))) | |
1987 | ||
1403e1f7 PN |
1988 | (define-public pcsxr |
1989 | ;; No release since 2017. | |
1990 | (let ((commit "6484236cb0281e8040ff6c8078c87899a3407534")) | |
1991 | (package | |
1992 | (name "pcsxr") | |
1993 | ;; Version is tagged here: https://github.com/frealgagu/PCSX-Reloaded | |
1994 | (version "1.9.95") | |
1995 | (source | |
1996 | (origin | |
1997 | (method git-fetch) | |
1998 | (uri (git-reference | |
1999 | (url "https://github.com/pcsxr/PCSX-Reloaded") | |
2000 | (commit commit))) | |
2001 | (sha256 | |
2002 | (base32 | |
2003 | "138mayp7zi9v4l3lm5f6xxkds619w1fgg769zm8s45c84jbz7dza")) | |
2004 | (file-name (git-file-name name commit)))) | |
2005 | (build-system cmake-build-system) | |
2006 | (arguments | |
2007 | `(#:tests? #f ;no "test" target | |
2008 | #:configure-flags | |
2009 | (list "-DSND_BACKEND=pulse" | |
2010 | "-DENABLE_CCDDA='ON'" | |
2011 | "-DUSE_LIBARCHIVE='ON'" | |
2012 | "-DUSE_LIBCDIO='ON'") | |
2013 | #:phases | |
2014 | (modify-phases %standard-phases | |
2015 | (add-after 'unpack 'cd-subdir | |
1ef71f52 | 2016 | (lambda _ (chdir "pcsxr") #t)) |
1403e1f7 PN |
2017 | (add-before 'configure 'fix-cdio-lookup |
2018 | (lambda* (#:key inputs #:allow-other-keys) | |
2019 | (substitute* "cmake/FindCdio.cmake" | |
2020 | (("/usr/include/cdio") | |
425ccde6 | 2021 | (search-input-directory inputs "/include/cdio"))))) |
1ef71f52 KK |
2022 | (add-after 'install 'wrap-program |
2023 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2024 | (wrap-program (string-append (assoc-ref outputs "out") | |
2025 | "/bin/pcsxr") | |
2026 | ;; For GtkFileChooserDialog. | |
2027 | `("GSETTINGS_SCHEMA_DIR" = | |
2028 | (,(string-append (assoc-ref inputs "gtk+") | |
2029 | "/share/glib-2.0/schemas")))) | |
2030 | #t))))) | |
1403e1f7 | 2031 | (native-inputs |
8394619b LC |
2032 | (list pkg-config intltool |
2033 | `(,glib "bin"))) | |
1403e1f7 | 2034 | (inputs |
8394619b LC |
2035 | (list libcdio |
2036 | sdl2 | |
2037 | gtk+ | |
2038 | ffmpeg | |
2039 | libxv | |
2040 | libarchive | |
2041 | pulseaudio)) | |
1403e1f7 PN |
2042 | (home-page "https://archive.codeplex.com/?p=pcsxr") |
2043 | (synopsis "PlayStation emulator") | |
2044 | (description | |
2045 | "A PlayStation emulator based on PCSX-df Project with bugfixes and | |
2046 | improvements.") | |
2047 | (license license:gpl2+)))) | |
f6a0be2f DW |
2048 | |
2049 | (define-public gens-gs | |
2050 | (package | |
2051 | (name "gens-gs") | |
2052 | (version "7") | |
2053 | (source | |
2054 | (origin | |
2055 | (method url-fetch) | |
2056 | (uri (string-append "https://retrocdn.net/images/6/6d/Gens-gs-r" | |
2057 | version ".tar.gz")) | |
2058 | (sha256 | |
2059 | (base32 | |
2060 | "1ha5s6d3y7s9aq9f4zmn9p88109c3mrj36z2w68jhiw5xrxws833")))) | |
2061 | (build-system glib-or-gtk-build-system) | |
2062 | (arguments | |
2063 | `(#:system "i686-linux" | |
2064 | #:phases | |
2065 | (modify-phases %standard-phases | |
2066 | (add-after 'unpack 'fix-CFLAGS | |
2067 | (lambda* _ | |
2068 | ;; Remove GTK API deprecation flags that cause build errors. | |
2069 | (substitute* "configure" | |
2070 | (("GTK_CFLAGS=\"\\$GTK_CFLAGS .*\"") "")) | |
2071 | #t))))) | |
2072 | (native-inputs | |
8394619b | 2073 | (list pkg-config nasm)) |
f6a0be2f DW |
2074 | (inputs |
2075 | `(("sdl" ,sdl) | |
2076 | ("gtk" ,gtk+-2))) | |
2077 | (home-page "https://segaretro.org/Gens/GS") | |
2078 | (synopsis "Emulator for Sega Genesis/Mega Drive systems") | |
2079 | (description | |
2080 | "Gens/GS is an emulator for the Mega Drive (also known as Sega Genesis), | |
2081 | derived from Gens. Project goals include clean source code, combined features | |
2082 | from various forks of Gens, and improved platform portability.") | |
2083 | (supported-systems '("i686-linux" "x86_64-linux")) | |
2084 | (license license:gpl2+))) | |
391aff1f PN |
2085 | |
2086 | (define-public bsnes | |
2087 | (package | |
2088 | (name "bsnes") | |
2089 | (version "115") | |
2090 | (source | |
2091 | (origin | |
2092 | (method git-fetch) | |
2093 | (uri (git-reference | |
2094 | (url "https://github.com/bsnes-emu/bsnes") | |
2095 | (commit (string-append "v" version)))) | |
2096 | (file-name (git-file-name name version)) | |
2097 | (sha256 | |
2098 | (base32 | |
2099 | "0j054x38fwai61vj36sc04r3zkzay5acq2cgd9zqv5hs51s36g5b")))) | |
2100 | (build-system gnu-build-system) | |
2101 | (arguments | |
2102 | `(#:make-flags (list "-C" "bsnes" | |
5fe9481d | 2103 | ;; Remove march=native |
2104 | "local=false" | |
391aff1f PN |
2105 | (string-append "prefix=" (assoc-ref %outputs "out"))) |
2106 | #:tests? #f ; No tests. | |
2107 | #:phases (modify-phases %standard-phases | |
2108 | (delete 'configure)))) | |
2109 | (native-inputs | |
8394619b | 2110 | (list pkg-config)) |
391aff1f PN |
2111 | (inputs |
2112 | `(("alsa-lib" ,alsa-lib) | |
2113 | ("ao" ,ao) | |
2114 | ("cairo" ,cairo) | |
2115 | ("eudev" ,eudev) | |
391aff1f | 2116 | ("gtksourceview-2" ,gtksourceview-2) |
391aff1f PN |
2117 | ("libxrandr" ,libxrandr) |
2118 | ("libxv" ,libxv) | |
2119 | ("openal" ,openal) | |
2120 | ("pulseaudio" ,pulseaudio) | |
2121 | ("sdl2" ,sdl2))) | |
2122 | (home-page "https://bsnes.dev/") | |
2123 | (synopsis "Emulator for the Super Nintendo / Super Famicom systems") | |
2124 | (description | |
2125 | "bsnes is a Super Nintendo / Super Famicom emulator that focuses on | |
2126 | performance, features, and ease of use.") | |
2127 | (license license:gpl3))) | |
f43e4104 JK |
2128 | |
2129 | ;; python-pwntools requires a -rc release of unicorn | |
2130 | (define-public unicorn | |
2131 | (let ((unless-x86 | |
2132 | (lambda (code) | |
2133 | (if (member (%current-system) '("x86_64-linux" "i686-linux")) | |
2134 | '() | |
2135 | code)))) | |
2136 | (package | |
2137 | (name "unicorn") | |
2138 | (version "1.0.2-rc4") | |
2139 | ;; NOTE: unicorn ships a bundled QEMU, but with a lot of custom modifications. | |
2140 | (source | |
2141 | (origin | |
2142 | (method git-fetch) | |
2143 | (uri (git-reference | |
2144 | (url "https://github.com/unicorn-engine/unicorn") | |
2145 | (commit version))) | |
2146 | (file-name (git-file-name name version)) | |
2147 | (sha256 | |
2148 | (base32 | |
2149 | "17nyccgk7hpc4hab24yn57f1xnmr7kq4px98zbp2bkwcrxny8gwy")))) | |
2150 | (outputs '("out" "python")) | |
2151 | ;; The main library is not written in Python, but the build process has | |
2152 | ;; little in common with any defined build system, so we might as well | |
2153 | ;; build on top of python-build-system and make use of all | |
2154 | ;; the Python-specific phases that can be reused. | |
2155 | (build-system python-build-system) | |
2156 | (arguments | |
2157 | `(#:modules ((srfi srfi-26) | |
2158 | (guix build python-build-system) | |
2159 | (guix build utils)) | |
2160 | #:phases | |
2161 | (modify-phases %standard-phases | |
f43e4104 JK |
2162 | (add-before 'build 'build-library |
2163 | (lambda* (#:key inputs #:allow-other-keys) | |
2164 | (invoke "make" | |
2165 | "-j" (number->string (parallel-job-count)) | |
2166 | "UNICORN_STATIC=no" | |
2167 | "CC=gcc"))) | |
2168 | (add-after 'build-library 'install-library | |
2169 | (lambda* (#:key outputs #:allow-other-keys) | |
2170 | (invoke "make" "install" | |
2171 | "UNICORN_STATIC=no" | |
2172 | (string-append | |
2173 | "PREFIX=" | |
352e6c8a | 2174 | (assoc-ref outputs "out"))))) |
f43e4104 JK |
2175 | (add-before 'build 'prepare-bindings |
2176 | (lambda* (#:key outputs #:allow-other-keys) | |
2177 | (chdir "bindings/python") | |
2178 | ;; Set this environment variable so that the Python bindings | |
2179 | ;; don't build their own copy of the shared object, but use | |
2180 | ;; a dummy value such that the bindings test suite uses the | |
2181 | ;; same mechanism for loading the library as any other user. | |
2182 | (setenv "LIBUNICORN_PATH" "1") | |
2183 | (substitute* "unicorn/unicorn.py" | |
2184 | (("_path_list = \\[.*") | |
2185 | (string-append | |
2186 | "_path_list = [\"" | |
352e6c8a | 2187 | (assoc-ref outputs "out") |
f43e4104 JK |
2188 | ;; eat the rest of the list |
2189 | "/lib\"] + 0*["))) | |
2190 | #t)) | |
2191 | (add-before 'check 'check-library | |
2192 | (lambda* (#:key outputs #:allow-other-keys) | |
2193 | (for-each | |
2194 | (lambda (suite) | |
2195 | (with-directory-excursion | |
2196 | (string-append "../../tests/" suite) | |
2197 | (invoke "make" "test" "CC=gcc" | |
2198 | ,@(unless-x86 | |
2199 | '("AS=i686-unknown-linux-gnu-as" | |
2200 | "OBJCOPY=i686-unknown-linux-gnu-objcopy"))))) | |
2201 | '("unit" "regress")) | |
2202 | #t)) | |
2203 | (add-after 'install 'install-samples | |
2204 | (lambda* (#:key outputs #:allow-other-keys) | |
2205 | (let* ((python-samples (find-files "." "sample_.*")) | |
2206 | (c-samples (find-files "../../samples" ".*\\.c")) | |
2207 | (python-docdir | |
352e6c8a | 2208 | (string-append (assoc-ref outputs "python") |
f43e4104 JK |
2209 | "/share/doc/unicorn/samples")) |
2210 | (c-docdir | |
352e6c8a | 2211 | (string-append (assoc-ref outputs "out") |
f43e4104 JK |
2212 | "/share/doc/unicorn/samples"))) |
2213 | (for-each (cut install-file <> c-docdir) c-samples) | |
2214 | (for-each (cut install-file <> python-docdir) python-samples) | |
2215 | #t)))))) | |
2216 | (native-inputs | |
2217 | ;; NOTE: cross-binutils needs to be wrapped with unless-x86, as otherwise | |
2218 | ;; the linker provided by the package will be used, circumventing the ld-wrapper. | |
2219 | `(,@(unless-x86 | |
2220 | `(("assembler-for-tests" ,(cross-binutils "i686-unknown-linux-gnu")))) | |
2221 | ("cmocka" ,cmocka) | |
2222 | ("hexdump-for-tests" ,util-linux))) | |
fed13678 | 2223 | (home-page "https://www.unicorn-engine.org") |
f43e4104 JK |
2224 | (synopsis "Unicorn CPU emulator framework") |
2225 | (description | |
2226 | "Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator | |
2227 | framework based on QEMU.") | |
2228 | (license license:gpl2+)))) | |
10543ef8 LP |
2229 | |
2230 | (define-public ppsspp | |
fc2ff004 LMP |
2231 | (package |
2232 | (name "ppsspp") | |
2233 | (version "1.12.3") | |
2234 | (source | |
2235 | (origin | |
2236 | (method git-fetch) | |
2237 | (uri (git-reference | |
2238 | (url "https://github.com/hrydgard/ppsspp") | |
2239 | (commit (string-append "v" version)))) | |
2240 | (sha256 | |
2241 | (base32 "1p6pmp0lhqhk9h5r9xsjicd0zn08bwx3y8533npps96ixwbm2y15")) | |
2242 | (file-name (git-file-name name version)) | |
2243 | (patches | |
2244 | (search-patches "ppsspp-disable-upgrade-and-gold.patch")) | |
2245 | (modules '((guix build utils))) | |
2246 | (snippet | |
2247 | `(begin | |
2248 | ;; The following is quite a heavy-handed way of unbundling PPSSPP. | |
2249 | ;; There are still a number of external sources, that we don't | |
2250 | ;; remove here. Some may be packaged, others are not. | |
2251 | ;; First, we patch existing sources to include the right headers. | |
2252 | (substitute* (append (find-files "Common" ".*\\.(h|cpp)") | |
2253 | (find-files "Core" ".*\\.(h|cpp)") | |
2254 | (find-files "GPU" ".*\\.(h|cpp)") | |
2255 | (find-files "SDL" ".*\\.(h|cpp)") | |
2256 | (find-files "UI" ".*\\.(h|cpp)")) | |
2257 | ;; These headers are all hard-coded in the original source. | |
2258 | (("ext/cityhash/") "") | |
2259 | (("ext/glslang/glslang/") "glslang/") | |
2260 | (("ext/glslang/") "glslang/") | |
2261 | (("ext/miniupnp/") "") | |
2262 | (("ext/SPIRV-Cross/") "spirv_cross/") | |
2263 | (("ext/vulkan/") "vulkan/") | |
2264 | (("ext/xxhash.h") "xxhash.h") | |
2265 | ;; These definitions do not actually exist in the Vulkan headers, | |
2266 | ;; but PPSSPP defines them in ext/vulkan. | |
2267 | (("VK_FORMAT_BEGIN_RANGE") "VK_FORMAT_UNDEFINED") | |
2268 | (("VK_FORMAT_END_RANGE") "VK_FORMAT_ASTC_12x12_SRGB_BLOCK")) | |
2269 | ;; Next, we patch CMakeLists. | |
2270 | (substitute* "CMakeLists.txt" | |
2271 | ;; Drop unnecessary includes and targets. | |
2272 | (("include_directories\\(ext/glslang\\)") "") | |
2273 | (("include_directories\\(ext/xxhash\\)") "") | |
2274 | (("include_directories\\(ext/cityhash\\)") "") | |
2275 | (("include_directories\\(ext/zstd.*") "") | |
2276 | (("libzstd_static") "zstd") | |
2277 | (("set_target_properties\\(cityhash .*\\)") "") | |
2278 | ;; Fix linking to GLEW. | |
2279 | (("TARGET Ext::GLEW") "true") | |
2280 | (("target_link_libraries\\(native Ext::GLEW\\)") | |
2281 | "find_package(GLEW)\ntarget_link_libraries(native GLEW::GLEW)") | |
2282 | (("Ext::Snappy") "snappy") | |
2283 | ;; Don't search for cityhash/xxhash, we already have them. | |
2284 | (("add_library\\((city|xx)hash STATIC") "if()\nendif(") | |
2285 | (("ext/xxhash\\.[ch]") "") | |
2286 | (("ext/cityhash/.*\\.(cpp|h)") "") | |
2287 | (("if\\(USE_MINIUPNPC\\)" all) | |
2288 | (string-append all " | |
a3084e1e LP |
2289 | find_package(miniupnpc) |
2290 | target_link_libraries(${CoreLibName} miniupnpc ${LDLIBS}) | |
2291 | elseif(FALSE)")) | |
fc2ff004 LMP |
2292 | ;; Link all of spirv-cross. |
2293 | (("spirv-cross-glsl" all) | |
2294 | (string-append all | |
2295 | " spirv-cross-core spirv-cross-cpp" | |
2296 | " spirv-cross-reflect spirv-cross-util"))) | |
2297 | (substitute* "ext/CMakeLists.txt" | |
2298 | (("add_subdirectory\\(glew.*") "") | |
2299 | (("add_subdirectory\\(glslang.*") "") | |
2300 | (("add_subdirectory\\(snappy.*") "") | |
2301 | (("add_subdirectory\\(SPIRV-Cross-build.*") "") | |
2302 | (("add_subdirectory\\(zstd.*") "")) | |
2303 | ;; Finally, we can delete the bundled sources. | |
2304 | (for-each delete-file-recursively | |
2305 | '("ext/cmake" | |
2306 | "ext/glew" | |
2307 | "ext/glslang" "ext/glslang-build" | |
2308 | "ext/miniupnp" "ext/miniupnp-build" | |
2309 | "ext/native" | |
2310 | "ext/snappy" | |
2311 | "ext/SPIRV-Cross" "ext/SPIRV-Cross-build" | |
2312 | "ext/vulkan" | |
2313 | "ext/xxhash.c" | |
2314 | "ext/xxhash.h" | |
2315 | "ext/zlib" | |
2316 | "ext/zstd")) | |
2317 | ;; Since we are not including git as an input, PPSSPP is confused | |
2318 | ;; about its version. Let's fix that here. | |
2319 | (substitute* "git-version.cmake" | |
2320 | (("unknown") ,version)))))) | |
2321 | (build-system cmake-build-system) | |
2322 | (native-inputs (list pkg-config python)) | |
2323 | (inputs (list bash | |
2324 | cityhash | |
2325 | ffmpeg | |
2326 | glew | |
2327 | glslang | |
2328 | libpng | |
2329 | libzip | |
2330 | mesa | |
2331 | miniupnpc | |
2332 | sdl2 | |
2333 | snappy | |
2334 | spirv-cross | |
2335 | vulkan-headers | |
2336 | vulkan-loader | |
2337 | xxhash | |
2338 | zlib | |
2339 | `(,zstd "lib"))) | |
2340 | (arguments | |
2341 | (list | |
2342 | #:out-of-source? #f | |
2343 | #:configure-flags #~(list "-DUSE_DISCORD=OFF" | |
2344 | "-DUSE_SYSTEM_FFMPEG=ON" | |
2345 | "-DUSE_SYSTEM_LIBZIP=ON" | |
2346 | ;; for testing | |
2347 | "-DUNITTEST=ON" "-DHEADLESS=ON") | |
2348 | #:phases | |
2349 | #~(modify-phases %standard-phases | |
2350 | (add-after 'unpack 'add-external-sources | |
2351 | (lambda* (#:key inputs #:allow-other-keys) | |
2352 | ;; TODO: unbundle armips. | |
2353 | (copy-recursively #$(package-source armips) "ext/armips") | |
2354 | ;; Some tests are externalised, so we add them here. | |
2355 | (copy-recursively | |
2356 | #$(let ((commit "1047400eaec6bcbdb2a64d326375ef6a6617c4ac")) | |
2357 | (origin | |
2358 | (method git-fetch) | |
2359 | (uri (git-reference | |
2360 | (url "https://github.com/hrydgard/pspautotests") | |
2361 | (commit commit))) | |
2362 | (sha256 | |
2363 | (base32 "0nxv1lskcr8zbg6nrfai21mxsw0n5vaqhbsa41c3cxfyx5c4w2pg")) | |
2364 | (file-name (git-file-name "pspautotests" commit)))) | |
2365 | "pspautotests"))) | |
2366 | (add-after 'unpack 'fix-unittest-build | |
2367 | (lambda _ | |
2368 | (substitute* "CMakeLists.txt" | |
2369 | (("unittest/TestVertexJit.cpp" all) | |
2370 | (string-append all " unittest/TestShaderGenerators.cpp"))) | |
2371 | (substitute* "unittest/TestVertexJit.cpp" | |
2372 | (("#include \"unittest/UnitTest.h\"" all) | |
2373 | (string-append all "\n#include <cmath>"))))) | |
2374 | (replace 'check | |
2375 | (lambda* (#:key tests? #:allow-other-keys) | |
2376 | (when tests? | |
2377 | (for-each | |
2378 | (lambda (t) (invoke "./unitTest" t)) | |
2379 | '("Arm64Emitter" "ArmEmitter" "X64Emitter" "VertexJit" "Asin" | |
2380 | "SinCos" "VFPUSinCos" "MathUtil" "Parsers" "Jit" | |
2381 | "MatrixTranspose" "ParseLBN" "QuickTexHash" "CLZ" | |
2382 | #|"ShaderGenerators"|#)) | |
2383 | (invoke "python3" "test.py" "-g")))) | |
2384 | (replace 'install | |
2385 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2386 | (let* ((out (assoc-ref outputs "out")) | |
2387 | (bin/ppsspp (string-append out "/bin/ppsspp")) | |
2388 | (share (string-append out "/share/ppsspp"))) | |
2389 | (copy-recursively "icons/hicolor" | |
2390 | (string-append out "/share/icons/hicolor")) | |
2391 | (install-file "PPSSPPSDL" share) | |
2392 | (copy-recursively "assets" (string-append share "/assets")) | |
10543ef8 | 2393 | |
fc2ff004 LMP |
2394 | (make-desktop-entry-file |
2395 | (string-append out "/share/applications/ppsspp.desktop") | |
2396 | #:name "PPSSPP" | |
2397 | #:exec (string-append share "/PPSSPPSDL") | |
2398 | #:icon "ppsspp") | |
2399 | (mkdir-p (string-append out "/bin")) | |
2400 | (with-output-to-file bin/ppsspp | |
2401 | (lambda () | |
2402 | (format #t "#!~a~%exec ~a/PPSSPPSDL \"$@\"" | |
2403 | (search-input-file inputs "/bin/bash") share))) | |
2404 | (chmod bin/ppsspp #o755))))))) | |
2405 | (home-page "https://www.ppsspp.org/") | |
2406 | (synopsis "PSP emulator") | |
2407 | (description | |
2408 | "PPSSPP is a ``high-level'' emulator simulating the PSP operating | |
10543ef8 | 2409 | system.") |
fc2ff004 | 2410 | (license license:gpl2+))) |
dacda115 DM |
2411 | |
2412 | (define-public exomizer | |
2413 | (package | |
2414 | (name "exomizer") | |
2415 | (version "3.1.1") | |
2416 | (source (origin | |
2417 | (method git-fetch) | |
2418 | (uri (git-reference | |
2419 | (url "https://bitbucket.org/magli143/exomizer.git") | |
2420 | (commit "6a152b5605648f7a41eadd4b011a93ec92f74dd8"))) | |
2421 | (file-name (string-append name "-" version "-checkout")) | |
2422 | (sha256 | |
2423 | (base32 | |
2424 | "1ynhkb5p2dypkikipc3krzif264l9rmx1wnjzzgw8n88i4zkymzg")))) | |
2425 | (build-system gnu-build-system) | |
2426 | (arguments | |
2427 | `(#:tests? #f ; No target exists | |
2428 | #:phases | |
2429 | (modify-phases %standard-phases | |
2430 | (add-after 'unpack 'chdir | |
2431 | (lambda _ | |
2432 | (delete-file-recursively "exodecrs") | |
2433 | (delete-file-recursively "rawdecrs") | |
2434 | (chdir "src") | |
2435 | ;; Those will be regenerated. | |
2436 | (delete-file "asm.tab.h") | |
2437 | (delete-file "asm.tab.c") | |
2438 | (delete-file "lex.yy.c") | |
2439 | #t)) | |
2440 | (replace 'configure | |
2441 | (lambda _ | |
2442 | (setenv "CC" ,(cc-for-target)) | |
2443 | #t)) | |
2444 | (replace 'install | |
2445 | (lambda* (#:key outputs #:allow-other-keys) | |
2446 | (let ((out-bin (string-append (assoc-ref outputs "out") "/bin"))) | |
2447 | (install-file "exomizer" out-bin) | |
2448 | (install-file "exobasic" out-bin)) | |
2449 | #t))))) | |
2450 | (native-inputs | |
8394619b | 2451 | (list flex bison)) |
dacda115 DM |
2452 | (synopsis "Compressor for use on Commodore home computers") |
2453 | (description "This program compresses files in a way that tries to be as | |
2454 | efficient as possible but still allows them to be decompressed in environments | |
2455 | where CPU speed and RAM are limited. It also generate a self-extractor for use | |
2456 | on a Commodore C64, C128 etc.") | |
2457 | (home-page "https://bitbucket.org/magli143/exomizer/wiki/Home") | |
2458 | ;; Some files are LGPL 2.1--but we aren't building from or installing those. | |
2459 | ;; zlib license with an (non-)advertising clause. | |
2460 | (license license:zlib))) | |
0e86d6ff DM |
2461 | |
2462 | (define-public cc65 | |
2463 | (package | |
2464 | (name "cc65") | |
2465 | (version "2.19") | |
2466 | (source (origin | |
2467 | (method git-fetch) | |
2468 | (uri (git-reference | |
2469 | (url "https://github.com/cc65/cc65.git") | |
2470 | (commit (string-append "V" version)))) | |
2471 | (file-name (string-append name "-" version "-checkout")) | |
2472 | (sha256 | |
2473 | (base32 | |
2474 | "01a15yvs455qp20hri2pbg2wqvcip0d50kb7dibi9427hqk9cnj4")))) | |
2475 | (build-system gnu-build-system) | |
2476 | (arguments | |
2477 | `(#:tests? #f ; No target exists. | |
2478 | #:make-flags | |
2479 | (list "BUILD_ID=V2.18 - Git 55528249" | |
2480 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
2481 | #:phases | |
2482 | (modify-phases %standard-phases | |
2483 | (replace 'configure | |
2484 | (lambda* (#:key source #:allow-other-keys) | |
2485 | ;; We include $SOURCE/include in C_INCLUDE_PATH. Remove it. | |
2486 | (setenv "C_INCLUDE_PATH" | |
2487 | (string-join | |
2488 | (filter (lambda (name) | |
2489 | (not (string=? name (string-append source "/include")))) | |
2490 | (string-split (getenv "C_INCLUDE_PATH") #\:)) | |
2491 | ":")) | |
2492 | #t))))) | |
2493 | (synopsis "Development environment for 6502 systems") | |
2494 | (description "This package provides a development environment for 6502 systems, including macro assembler, C compiler, linker, librarian and several other tools.") | |
2495 | (home-page "https://cc65.github.io/") | |
2496 | (license license:zlib))) |