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