1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
| | ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
;;; Copyright © 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2015, 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015, 2018 David Thompson <dthompson2@worcester.edu>
;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages emulators)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix svn-download)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages audio)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages boost)
#:use-module (gnu packages backup)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages fonts)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages game-development)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages libedit)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages qt)
#:use-module (gnu packages sdl)
#:use-module (gnu packages tls)
#:use-module (gnu packages upnp)
#:use-module (gnu packages video)
#:use-module (gnu packages vulkan)
#:use-module (gnu packages wxwidgets)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu))
(define-public desmume
(package
(name "desmume")
(version "0.9.11")
(source
(origin
(method url-fetch)
(uri (string-append
"mirror://sourceforge/desmume/desmume/"
version "/desmume-" version ".tar.gz"))
(sha256
(base32
"15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs"))))
(build-system gnu-build-system)
(arguments
;; Enable support for WiFi and microphone.
`(#:configure-flags '("--enable-wifi"
"--enable-openal")))
(native-inputs
`(("pkg-config" ,pkg-config)
("intltool" ,intltool)))
(inputs
`(("zlib" ,zlib)
("sdl" ,sdl)
("glib" ,glib)
("gtk+" ,gtk+-2)
("glu" ,glu)))
(home-page "http://desmume.org/")
(synopsis "Nintendo DS emulator")
(description
"DeSmuME is an emulator for the Nintendo DS handheld gaming console.")
(license license:gpl2)))
;; Building from recent Git because the official 5.0 release no longer builds.
(define-public dolphin-emu
(let ((commit "d04b179111f8d863f360839474cb82c766f762b8")
(revision "0"))
(package
(name "dolphin-emu")
(version (git-version "5.0" revision commit))
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/dolphin-emu/dolphin.git")
(commit commit)))
(file-name (git-file-name name version))
(modules '((guix build utils)))
(snippet
'(begin
;; Remove external stuff we don't need.
(for-each (lambda (dir)
(delete-file-recursively
(string-append "Externals/" dir)))
'("LZO" "OpenAL" "Qt" "SFML" "SOIL" "curl" "ffmpeg"
"gettext" "hidapi" "libpng" "libusb" "mbedtls"
"miniupnpc" "wxWidgets3" "zlib"))
;; Clean up source.
(for-each delete-file (find-files "." ".*\\.(bin|dsy|exe|jar|rar)$"))
#t))
(sha256
(base32
"0g725wmhlim73zrhi47wmr1bmplpy4b7sbimd5pm8xpfhj5nm10l"))))
(build-system cmake-build-system)
(arguments
'(#:tests? #f
;; The FindGTK2 cmake script only checks hardcoded directories for
;; glib/gtk headers.
#:phases
(modify-phases %standard-phases
(add-before 'configure 'generate-fonts&hardcore-libvulkan-path
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((fontfile
(string-append (assoc-ref inputs "font-wqy-microhei")
"/share/fonts/truetype/wqy-microhei.ttc"))
(libvulkan
(string-append (assoc-ref inputs "vulkan-icd-loader")
"/lib/libvulkan.so")))
(chdir "docs")
(invoke "bash" "-c" "g++ -O2 -std=c++11 $(freetype-config \
--cflags --libs) gc-font-tool.cpp -o gc-font-tool")
(invoke "./gc-font-tool" "a" fontfile "font_western.bin")
(invoke "./gc-font-tool" "s" fontfile "font_japanese.bin")
(copy-file "font_japanese.bin" "../Data/Sys/GC/font_japanese.bin")
(copy-file "font_western.bin" "../Data/Sys/GC/font_western.bin")
(chdir "..")
(substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp"
(("libvulkan.so") libvulkan))
#t))))
#:configure-flags
(list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
(assoc-ref %build-inputs "gtk+")
"/lib/gtk-2.0/include")
(string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
(assoc-ref %build-inputs "glib")
"/lib/glib-2.0/include")
(string-append "-DX11_INCLUDE_DIR="
(assoc-ref %build-inputs "libx11")
"/include")
(string-append "-DX11_LIBRARIES="
(assoc-ref %build-inputs "libx11")
"/lib/libX11.so")
"-DX11_FOUND=1")))
(native-inputs
`(("pkg-config" ,pkg-config)
("gettext" ,gnu-gettext)))
(inputs
`(("alsa-lib" ,alsa-lib)
("ao" ,ao)
("bluez" ,bluez)
("curl" ,curl)
("eudev" ,eudev)
("ffmpeg" ,ffmpeg)
("font-wqy-microhei" ,font-wqy-microhei)
("freetype" ,freetype)
("glew" ,glew)
("glib" ,glib)
("glu" ,glu)
("gtk+" ,gtk+-2)
("hidapi" ,hidapi)
("libevdev" ,libevdev)
("libpng" ,libpng)
("libusb" ,libusb)
("libx11" ,libx11)
("libxi" ,libxi)
("libxrandr" ,libxrandr)
("lzo" ,lzo)
("mbedtls-apache" ,mbedtls-apache)
("mesa" ,mesa)
("miniupnpc" ,miniupnpc)
("openal" ,openal)
("pulseaudio" ,pulseaudio)
("qtbase" ,qtbase)
("sdl2" ,sdl2)
("sfml" ,sfml)
("soil" ,soil)
("soundtouch" ,soundtouch)
("vulkan-icd-loader" ,vulkan-icd-loader)
("wxwidgets" ,wxwidgets-gtk2-3.1)
("zlib" ,zlib)))
(home-page "https://dolphin-emu.org/")
(synopsis "Nintendo Wii and GameCube emulator")
(description
"Dolphin is an emulator for two Nintendo video game consoles: the
GameCube and the Wii. It provides compatibility with all PC controllers,
turbo speed, networked multiplayer, and graphical enhancements.")
(supported-systems '("x86_64-linux" "aarch64-linux"))
; dolphin/Data/Sys/GC/font_*.bin: Licensed under ASL2.0.
(license (list license:gpl2+ license:asl2.0 license:fdl1.2+)))))
(define-public dosbox
(package
(name "dosbox")
(version "0.74.svn3947")
(source (origin
(method svn-fetch)
(uri (svn-reference
(url "http://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk/")
(revision 3947)))
(file-name (string-append name "-" version "-checkout"))
;; Use SVN head, since the last release (2010) is incompatible
;; with GCC 4.8+ (see
;; <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624976>).
(sha256
(base32
"1p918j6090d1nkvgq7ifvmn506zrdmyi32y7p3ms40d5ssqjg8fj"))))
(build-system gnu-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(add-after
'unpack 'autogen.sh
(lambda _
(zero? (system* "sh" "autogen.sh")))))))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)))
(inputs
`(("sdl" ,sdl)
("libpng" ,libpng)
("zlib" ,zlib)
("alsa-lib" ,alsa-lib)
("glu" ,glu)
("mesa" ,mesa)))
(home-page "http://www.dosbox.com")
(synopsis "X86 emulator with CGA/EGA/VGA/etc. graphics and sound")
(description "DOSBox is a DOS-emulator that uses the SDL library. DOSBox
also emulates CPU:286/386 realmode/protected mode, Directory
FileSystem/XMS/EMS, Tandy/Hercules/CGA/EGA/VGA/VESA graphics, a
SoundBlaster/Gravis Ultra Sound card for excellent sound compatibility with
older games.")
(license license:gpl2+)))
(define-public emulation-station
(let ((commit "646bede3d9ec0acf0ae378415edac136774a66c5"))
(package
(name "emulation-station")
(version "2.0.1")
(source (origin
(method git-fetch) ; no tarball available
(uri (git-reference
(url "https://github.com/Aloshi/EmulationStation.git")
(commit commit))) ; no version tag
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
"0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v"))))
(build-system cmake-build-system)
(arguments
'(#:tests? #f)) ; no tests
(inputs
`(("alsa-lib" ,alsa-lib)
("boost" ,boost)
("curl" ,curl)
("eigin" ,eigen)
("freeimage" ,freeimage)
("freetype" ,freetype)
("mesa" ,mesa)
("sdl2" ,sdl2)))
(synopsis "Video game console emulator front-end")
(description "EmulationStation provides a graphical front-end to a large
number of video game console emulators. It features an interface that is
usable with any game controller that has at least 4 buttons, theming support,
and a game metadata scraper.")
(home-page "http://www.emulationstation.org")
(license license:expat))))
(define-public higan
(package
(name "higan")
(version "106")
(source
(origin
(method url-fetch)
(uri (string-append
"https://gitlab.com/higan/higan/repository/archive.tar.gz?ref=v"
version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0y42pra0dxzlbkyzcp3r8a39pji2bj3p9fl40425f60af2igr4rw"))
(patches (search-patches "higan-remove-march-native-flag.patch"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
`(("alsa-lib" ,alsa-lib)
("ao" ,ao)
("eudev" ,eudev)
("gtk+" ,gtk+-2)
("gtksourceview-2" ,gtksourceview-2)
("libxv" ,libxv)
("mesa" ,mesa)
("openal" ,openal)
("pulseaudio" ,pulseaudio)
("sdl" ,sdl)))
(arguments
'(#:phases
(let ((build-phase (assoc-ref %standard-phases 'build))
(install-phase (assoc-ref %standard-phases 'install)))
(modify-phases %standard-phases
;; The higan build system has no configure phase.
(delete 'configure)
(add-before 'build 'chdir-to-higan
(lambda _
(chdir "higan")))
(add-before 'install 'create-/share/applications
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
;; It seems the author forgot to do this in the Makefile.
(mkdir-p (string-append out "/share/applications")))))
(add-after 'install 'chdir-to-icarus
(lambda _
(chdir "../icarus")))
(add-after 'chdir-to-icarus 'build-icarus build-phase)
(add-after 'build-icarus 'install-icarus install-phase)
(add-after 'install-icarus 'wrap-higan-executable
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(higan (string-append bin "/higan"))
(higan-original (string-append higan "-original"))
(bash (string-append (assoc-ref inputs "bash")
"/bin/bash"))
(coreutils (assoc-ref inputs "coreutils"))
(mkdir (string-append coreutils "/bin/mkdir"))
(cp (string-append coreutils "/bin/cp"))
(cp-r (string-append cp " -r --no-preserve=mode")))
;; First, have the executable make sure ~/.local/share/higan
;; contains up to date files. Higan insists on looking there
;; for these data files.
(rename-file higan higan-original)
(with-output-to-file higan
(lambda ()
(display
(string-append
"#!" bash "\n"
;; higan doesn't respect $XDG_DATA_HOME
mkdir " -p ~/.local/share\n"
cp-r " " out "/share/higan ~/.local/share\n"
"exec " higan-original))))
(chmod higan #o555)
;; Second, make sure higan will find icarus in PATH.
(wrap-program higan
`("PATH" ":" prefix (,bin))))))))
#:make-flags
(list "compiler=g++"
(string-append "prefix=" (assoc-ref %outputs "out")))
;; There is no test suite.
#:tests? #f))
(home-page "http://byuu.org/emulation/higan/")
(synopsis "Nintendo multi-system emulator")
(description
"higan (formerly bsnes) is an emulator for multiple Nintendo video game
consoles, including the Nintendo Entertainment System (NES/Famicom), Super
Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy
Color (GBC), and Game Boy Advance (GBA). It also supports the subsystems
Super Game Boy, BS-X Satellaview, and Sufami Turbo.")
;; As noted in these files among more:
;; - icarus/icarus.cpp
;; - higan/emulator/emulator.hpp
(license license:gpl3)))
(define-public mgba
(package
(name "mgba")
(version "0.6.3")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/mgba-emu/mgba/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"16hgs6r5iym3lp2cjcnv9955333976yc5sgy2kkxlsi005n91j1m"))
(modules '((guix build utils)))
(snippet
;; Make sure we don't use the bundled software.
'(for-each
(lambda (subdir)
(let ((lib-subdir (string-append "src/third-party/" subdir)))
(delete-file-recursively lib-subdir)))
'("libpng" "lzma" "sqlite3" "zlib")))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f ;no "test" target
#:configure-flags
(list "-DUSE_LZMA=OFF" ;do not use bundled LZMA
"-DUSE_LIBZIP=OFF" ;use "zlib" instead
(string-append "-DCMAKE_INSTALL_LIBDIR="
(assoc-ref %outputs "out") "/lib"))))
(native-inputs `(("pkg-config" ,pkg-config)))
(inputs `(("ffmpeg" ,ffmpeg)
("imagemagick" ,imagemagick)
("libedit" ,libedit)
("libepoxy" ,libepoxy)
("libpng" ,libpng)
("mesa" ,mesa)
("minizip" ,minizip)
("ncurses" ,ncurses)
("qtbase" ,qtbase)
("qtmultimedia" ,qtmultimedia)
("qttools" ,qttools)
("sdl2" ,sdl2)
("sqlite" ,sqlite)
("zlib" ,zlib)))
(home-page "https://mgba.io")
(synopsis "Game Boy Advance emulator")
(description
"mGBA is an emulator for running Game Boy Advance games. It aims to be
faster and more accurate than many existing Game Boy Advance emulators, as
well as adding features that other emulators lack. It also supports Game Boy
and Game Boy Color games.")
;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+ and "inih.c" is
;; BSD-3.
(license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3))))
(define-public mupen64plus-core
(package
(name "mupen64plus-core")
(version "2.5")
(source
(origin
(method url-fetch)
(uri (string-append
"https://github.com/mupen64plus/mupen64plus-core/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0dg2hksm5qni2hcha93k7n4fqr92888p946f7phb0ndschzfh9kk"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
("which" ,which)))
(inputs
`(("freetype" ,freetype)
("glu" ,glu)
("libpng" ,libpng)
("mesa" ,mesa)
("sdl2" ,sdl2)
("zlib" ,zlib)))
(arguments
'(#:phases
(modify-phases %standard-phases
;; The mupen64plus build system has no configure phase.
(delete 'configure)
;; Makefile is in a subdirectory.
(add-before
'build 'cd-to-project-dir
(lambda _
(chdir "projects/unix"))))
#:make-flags (let ((out (assoc-ref %outputs "out")))
(list "all" (string-append "PREFIX=" out)))
;; There are no tests.
#:tests? #f))
;; As per the Makefile (in projects/unix/Makefile):
(supported-systems '("i686-linux" "x86_64-linux"))
(home-page "http://www.mupen64plus.org/")
(synopsis "Nintendo 64 emulator core library")
(description
"Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
which is capable of accurately playing many games. This package contains the
core library.")
(license license:gpl2+)))
(define-public mupen64plus-audio-sdl
(package
(name "mupen64plus-audio-sdl")
(version "2.5")
(source
(origin
(method url-fetch)
(uri (string-append
"https://github.com/mupen64plus/mupen64plus-audio-sdl/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0ss6w92n2rpfnazhg9lbq0nvs3fqx93nliz3k3wjxdlx4dpi7h3a"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
("which" ,which)))
(inputs
`(("mupen64plus-core" ,mupen64plus-core)
("sdl2" ,sdl2)))
(arguments
'(#:phases
(modify-phases %standard-phases
;; The mupen64plus build system has no configure phase.
(delete 'configure)
;; Makefile is in a subdirectory.
(add-before
'build 'cd-to-project-dir
(lambda _
(chdir "projects/unix"))))
#:make-flags
(let ((out (assoc-ref %outputs "out"))
(m64p (assoc-ref %build-inputs "mupen64plus-core")))
(list "all"
(string-append "PREFIX=" out)
(string-append "APIDIR=" m64p "/include/mupen64plus")))
;; There are no tests.
#:tests? #f))
(home-page "http://www.mupen64plus.org/")
(synopsis "Mupen64Plus SDL input plugin")
(description
"Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
which is capable of accurately playing many games. This package contains the
SDL audio plugin.")
(license license:gpl2+)))
(define-public mupen64plus-input-sdl
(package
(name "mupen64plus-input-sdl")
(version "2.5")
(source
(origin
(method url-fetch)
(uri (string-append
"https://github.com/mupen64plus/mupen64plus-input-sdl/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "11sj5dbalp2nrlmki34vy7wy28vc175pnnkdk65p8599hnyq37ri"))))
(build-system gnu-build-system)
(native-inputs
`(("which" ,which)))
(inputs
`(("mupen64plus-core" ,mupen64plus-core)
("sdl2" ,sdl2)))
(arguments
'(#:phases
(modify-phases %standard-phases
;; The mupen64plus build system has no configure phase.
(delete 'configure)
;; Makefile is in a subdirectory.
(add-before
'build 'cd-to-project-dir
(lambda _
(chdir "projects/unix"))))
#:make-flags
(let ((out (assoc-ref %outputs "out"))
(m64p (assoc-ref %build-inputs "mupen64plus-core")))
(list "all"
(string-append "PREFIX=" out)
(string-append "APIDIR=" m64p "/include/mupen64plus")))
;; There are no tests.
#:tests? #f))
(home-page "http://www.mupen64plus.org/")
(synopsis "Mupen64Plus SDL input plugin")
(description
"Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
which is capable of accurately playing many games. This package contains the
SDL input plugin.")
(license license:gpl2+)))
(define-public mupen64plus-rsp-hle
(package
(name "mupen64plus-rsp-hle")
(version "2.5")
(source
(origin
(method url-fetch)
(uri (string-append
"https://github.com/mupen64plus/mupen64plus-rsp-hle/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "15h7mgz6xd2zjzm6l3f96sbs8kwr3xvbwzgikhnka79m6c69hsxv"))))
(build-system gnu-build-system)
(inputs
`(("mupen64plus-core" ,mupen64plus-core)))
(arguments
'(#:phases
(modify-phases %standard-phases
;; The mupen64plus build system has no configure phase.
(delete 'configure)
;; Makefile is in a subdirectory.
(add-before
'build 'cd-to-project-dir
(lambda _
(chdir "projects/unix"))))
#:make-flags
(let ((out (assoc-ref %outputs "out"))
(m64p (assoc-ref %build-inputs "mupen64plus-core")))
(list "all"
(string-append "PREFIX=" out)
(string-append "APIDIR=" m64p "/include/mupen64plus")))
;; There are no tests.
#:tests? #f))
(home-page "http://www.mupen64plus.org/")
(synopsis "Mupen64Plus SDL input plugin")
(description
"Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
which is capable of accurately playing many games. This package contains the
high-level emulation (HLE) RSP processor plugin.")
(license license:gpl2+)))
(define-public mupen64plus-rsp-z64
(package
(name "mupen64plus-rsp-z64")
(version "2.0.0")
(source
(origin
(method url-fetch)
(uri (string-append
"https://github.com/mupen64plus/mupen64plus-rsp-z64/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "10jz1w2dhx5slhyk4m8mdqlpsd6cshchslr1fckb2ayzb1ls3ghi"))))
(build-system gnu-build-system)
(inputs
`(("mupen64plus-core" ,mupen64plus-core)))
(arguments
'(#:phases
(modify-phases %standard-phases
;; The mupen64plus build system has no configure phase.
(delete 'configure)
;; Makefile is in a subdirectory.
(add-before
'build 'cd-to-project-dir
(lambda _
(chdir "projects/unix"))))
#:make-flags
(let ((out (assoc-ref %outputs "out"))
(m64p (assoc-ref %build-inputs "mupen64plus-core")))
(list "all"
(string-append "PREFIX=" out)
(string-append "APIDIR=" m64p "/include/mupen64plus")))
;; There are no tests.
#:tests? #f))
(home-page "http://www.mupen64plus.org/")
(synopsis "Mupen64Plus SDL input plugin")
(description
"Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
which is capable of accurately playing many games. This package contains the
Z64 RSP processor plugin.")
(license license:gpl2+)))
(define-public mupen64plus-video-arachnoid
(package
(name "mupen64plus-video-arachnoid")
(version "2.0.0")
(source
(origin
(method url-fetch)
(uri (string-append
"https://github.com/mupen64plus/mupen64plus-video-arachnoid/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0jjwf144rihznm4lnqbhgigxw664v3v32wy94adaa6imk8z6gslh"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
("which" ,which)))
(inputs
`(("mesa" ,mesa)
("mupen64plus-core" ,mupen64plus-core)))
(arguments
'(#:phases
(modify-phases %standard-phases
;; The mupen64plus build system has no configure phase.
(delete 'configure)
;; Makefile is in a subdirectory.
(add-before
'build 'cd-to-project-dir
(lambda _
(chdir "projects/unix"))))
#:make-flags
(let ((out (assoc-ref %outputs "out"))
(m64p (assoc-ref %build-inputs "mupen64plus-core")))
(list "all"
(string-append "PREFIX=" out)
(string-append "APIDIR=" m64p "/include/mupen64plus")))
;; There are no tests.
#:tests? #f))
(home-page "http://www.mupen64plus.org/")
(synopsis "Mupen64Plus Rice Video plugin")
(description
"Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
which is capable of accurately playing many games. This package contains the
Arachnoid video plugin.")
(license license:gpl2+)))
(define-public mupen64plus-video-glide64
(package
(name "mupen64plus-video-glide64")
(version "2.0.0")
(source
(origin
(method url-fetch)
(uri (string-append
"https://github.com/mupen64plus/mupen64plus-video-glide64/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "1rm55dbf6xgsq1blbzs6swa2ajv0qkn38acbljj346abnk6s3dla"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
("which" ,which)))
(inputs
`(("mesa" ,mesa)
("mupen64plus-core" ,mupen64plus-core)
("sdl2" ,sdl2)))
(arguments
'(#:phases
(modify-phases %standard-phases
;; The mupen64plus build system has no configure phase.
(delete 'configure)
;; Makefile is in a subdirectory.
(add-before
'build 'cd-to-project-dir
(lambda _
(chdir "projects/unix")))
;; XXX Should be unnecessary with the next release.
(add-before
'build 'use-sdl2
(lambda _
(substitute* "Makefile"
(("SDL_CONFIG = (.*)sdl-config" all prefix)
(string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
#:make-flags
(let ((out (assoc-ref %outputs "out"))
(m64p (assoc-ref %build-inputs "mupen64plus-core")))
(list "all"
(string-append "PREFIX=" out)
(string-append "APIDIR=" m64p "/include/mupen64plus")))
;; There are no tests.
#:tests? #f))
(home-page "http://www.mupen64plus.org/")
(synopsis "Mupen64Plus Rice Video plugin")
(description
"Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
which is capable of accurately playing many games. This package contains the
Glide64 video plugin.")
(license license:gpl2+)))
(define-public mupen64plus-video-glide64mk2
(package
(name "mupen64plus-video-glide64mk2")
(version "2.5")
(source
(origin
(method url-fetch)
(uri (string-append
"https://github.com/mupen64plus/mupen64plus-video-glide64mk2/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "1ihl4q293d6svba26b4mhapjcdg12p90gibz79b4mx423jlcxxj9"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
("which" ,which)))
(inputs
`(("boost" ,boost)
("libpng" ,libpng)
("mesa" ,mesa)
("mupen64plus-core" ,mupen64plus-core)
("sdl2" ,sdl2)
("zlib" ,zlib)))
(arguments
'(#:phases
(modify-phases %standard-phases
;; The mupen64plus build system has no configure phase.
(delete 'configure)
;; Makefile is in a subdirectory.
(add-before
'build 'cd-to-project-dir
(lambda _
(chdir "projects/unix"))))
#:make-flags
(let ((out (assoc-ref %outputs "out"))
(m64p (assoc-ref %build-inputs "mupen64plus-core")))
(list "all"
(string-append "PREFIX=" out)
(string-append "APIDIR=" m64p "/include/mupen64plus")))
;; There are no tests.
#:tests? #f))
(home-page "http://www.mupen64plus.org/")
(synopsis "Mupen64Plus Rice Video plugin")
(description
"Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
which is capable of accurately playing many games. This package contains the
Glide64MK2 video plugin.")
(license license:gpl2+)))
(define-public mupen64plus-video-rice
(package
(name "mupen64plus-video-rice")
(version "2.5")
(source
(origin
(method url-fetch)
(uri (string-append
"https://github.com/mupen64plus/mupen64plus-video-rice/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0rd2scjmh285w61aj3mgx71whg5rqrjbry3cdgicczrnyvf8wdvk"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
("which" ,which)))
(inputs
`(("libpng" ,libpng)
("mesa" ,mesa)
("mupen64plus-core" ,mupen64plus-core)
("sdl2" ,sdl2)))
(arguments
'(#:phases
(modify-phases %standard-phases
;; The mupen64plus build system has no configure phase.
(delete 'configure)
;; Makefile is in a subdirectory.
(add-before
'build 'cd-to-project-dir
(lambda _
(chdir "projects/unix"))))
#:make-flags
(let ((out (assoc-ref %outputs "out"))
(m64p (assoc-ref %build-inputs "mupen64plus-core")))
(list "all"
(string-append "PREFIX=" out)
(string-append "APIDIR=" m64p "/include/mupen64plus")))
;; There are no tests.
#:tests? #f))
(home-page "http://www.mupen64plus.org/")
(synopsis "Mupen64Plus Rice Video plugin")
(description
"Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
which is capable of accurately playing many games. This package contains the
Rice Video plugin.")
(license license:gpl2+)))
(define-public mupen64plus-video-z64
(package
(name "mupen64plus-video-z64")
(version "2.0.0")
(source
(origin
(method url-fetch)
(uri (string-append
"https://github.com/mupen64plus/mupen64plus-video-z64/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "1x7wsjs5gx2iwx20p4cjcbf696zsjlh31qxmghwv0ifrq8x58s1b"))
(patches (search-patches "mupen64plus-video-z64-glew-correct-path.patch"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
("which" ,which)))
(inputs
`(("glew" ,glew)
("mupen64plus-core" ,mupen64plus-core)
("sdl2" ,sdl2)))
(arguments
'(#:phases
(modify-phases %standard-phases
;; The mupen64plus build system has no configure phase.
(delete 'configure)
;; Makefile is in a subdirectory.
(add-before
'build 'cd-to-project-dir
(lambda _
(chdir "projects/unix")))
;; XXX Should be unnecessary with the next release.
(add-before
'build 'use-sdl2
(lambda _
(substitute* "Makefile"
(("SDL_CONFIG = (.*)sdl-config" all prefix)
(string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
#:make-flags
(let ((out (assoc-ref %outputs "out"))
(m64p (assoc-ref %build-inputs "mupen64plus-core")))
(list "all"
(string-append "PREFIX=" out)
(string-append "APIDIR=" m64p "/include/mupen64plus")))
;; There are no tests.
#:tests? #f))
(home-page "http://www.mupen64plus.org/")
(synopsis "Mupen64Plus Z64 video plugin")
(description
"Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
which is capable of accurately playing many games. This package contains the
Z64 video plugin.")
(license license:gpl2+)))
(define-public mupen64plus-ui-console
(package
(name "mupen64plus-ui-console")
(version "2.5")
(source
(origin
(method url-fetch)
(uri (string-append
"https://github.com/mupen64plus/mupen64plus-ui-console/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "04qkpd8ic7xsgnqz7spl00wxdygf79m7d1k8rabbygjk5lg6p8z2"))
(patches (search-patches "mupen64plus-ui-console-notice.patch"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
("which" ,which)))
(inputs
`(("sdl2" ,sdl2)))
;; Mupen64Plus supports a single data directory and a single plugin
;; directory in its configuration, yet we need data and plugin files from
;; a variety of packages. The best way to deal with this is to install
;; all packages from which data and plugin files are needed into one's
;; profile, and point the configuration there. Hence, propagate the most
;; important packages here to save the user from the bother. The patch
;; mupen64plus-ui-console-notice also gives users instructions on what
;; they need to do in order to point the configuration to their profile.
(propagated-inputs
`(("mupen64plus-core" ,mupen64plus-core)
("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl)
("mupen64plus-input-sdl" ,mupen64plus-input-sdl)
("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle)
("mupen64plus-video-glide64" ,mupen64plus-video-glide64)
("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2)
("mupen64plus-video-rice" ,mupen64plus-video-rice)))
(arguments
'(#:phases
(modify-phases %standard-phases
;; The mupen64plus build system has no configure phase.
(delete 'configure)
;; Makefile is in a subdirectory.
(add-before
'build 'cd-to-project-dir
(lambda _
(chdir "projects/unix"))))
#:make-flags
(let ((out (assoc-ref %outputs "out"))
(m64p (assoc-ref %build-inputs "mupen64plus-core")))
(list "all"
(string-append "PREFIX=" out)
(string-append "APIDIR=" m64p "/include/mupen64plus")
;; Trailing slash matters here.
(string-append "COREDIR=" m64p "/lib/")))
;; There are no tests.
#:tests? #f))
(home-page "http://www.mupen64plus.org/")
(synopsis "Mupen64Plus SDL input plugin")
(description
"Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
which is capable of accurately playing many games. This package contains the
command line user interface. Installing this package is the easiest way
towards a working Mupen64Plus for casual users.")
(license license:gpl2+)))
(define-public nestopia-ue
(package
(name "nestopia-ue")
(version "1.47")
(source (origin
(method url-fetch)
(uri (string-append
"https://github.com/rdanbrook/nestopia/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1dzrrjmvyqks64q5l5pfly80jb6qcsbj5b3dm40fijd5xnpbapci"))
(modules '((guix build utils)))
(snippet
'(begin
;; We don't need libretro for the GNU/Linux build.
(delete-file-recursively "libretro")
;; Use system zlib.
(delete-file-recursively "source/zlib")
(substitute* "source/core/NstZlib.cpp"
(("#include \"../zlib/zlib.h\"") "#include <zlib.h>"))))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
`(("ao" ,ao)
("glu" ,glu)
("gtk+" ,gtk+)
("libarchive" ,libarchive)
("mesa" ,mesa)
("sdl2" ,sdl2)
("zlib" ,zlib)))
(arguments
'(#:phases
(modify-phases %standard-phases
;; The Nestopia build system consists solely of a Makefile.
(delete 'configure)
(add-before 'build 'remove-xdg-desktop-menu-call
(lambda _
(substitute* "Makefile"
(("xdg-desktop-menu install .*") ""))))
(add-before 'build 'remove-gdkwayland-include
(lambda _
(substitute* "source/unix/gtkui/gtkui.h"
(("#include <gdk/gdkwayland\\.h>") "")))))
#:make-flags (let ((out (assoc-ref %outputs "out")))
(list "CC=gcc" "CXX=g++" (string-append "PREFIX=" out)))
;; There are no tests.
#:tests? #f))
(home-page "http://0ldsk00l.ca/nestopia/")
(synopsis "Nintendo Entertainment System (NES/Famicom) emulator")
(description
"Nestopia UE (Undead Edition) is a fork of the Nintendo Entertainment
System (NES/Famicom) emulator Nestopia, with enhancements from members of the
emulation community. It provides highly accurate emulation.")
(license license:gpl2+)))
(define-public retroarch
(package
(name "retroarch")
(version "1.7.1")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/libretro/RetroArch/archive/v"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "1wykv0w0kdlh7lh0k1ig0lpk5vh4c7r19jlfa9103jmjlryrq679"))))
(build-system gnu-build-system)
(arguments
'(#:tests? #f ; no tests
#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(etc (string-append out "/etc"))
(vulkan (assoc-ref inputs "vulkan-icd-loader")))
;; Hard-code the path to libvulkan.so.
(substitute* "gfx/common/vulkan_common.c"
(("libvulkan.so") (string-append vulkan "/lib/libvulkan.so")))
(substitute* "qb/qb.libs.sh"
(("/bin/true") (which "true")))
;; The configure script does not yet accept the extra arguments
;; (like ‘CONFIG_SHELL=’) passed by the default configure phase.
(zero? (system*
"./configure"
(string-append "--prefix=" out)
(string-append "--global-config-dir=" etc)))))))))
(inputs
`(("alsa-lib" ,alsa-lib)
("ffmpeg" ,ffmpeg)
("freetype" ,freetype)
("libxinerama" ,libxinerama)
("libxkbcommon" ,libxkbcommon)
("libxml2" ,libxml2)
("libxv" ,libxv)
("mesa" ,mesa)
("openal" ,openal)
("pulseaudio" ,pulseaudio)
("python" ,python)
("sdl" ,sdl2)
("udev" ,eudev)
("vulkan-icd-loader" ,vulkan-icd-loader)
("wayland" ,wayland)
("zlib" ,zlib)))
(native-inputs
`(("pkg-config" ,pkg-config)
("which" ,which)))
(home-page "https://www.libretro.com/")
(synopsis "Reference frontend for the libretro API")
(description
"Libretro is a simple but powerful development interface that allows for
the easy creation of emulators, games and multimedia applications that can plug
straight into any libretro-compatible frontend. RetroArch is the official
reference frontend for the libretro API, currently used by most as a modular
multi-system game/emulator system.")
(license license:gpl3+)))
|