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