summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--emulators.scm297
1 files changed, 297 insertions, 0 deletions
diff --git a/emulators.scm b/emulators.scm
new file mode 100644
index 0000000..65d47c9
--- /dev/null
+++ b/emulators.scm
@@ -0,0 +1,297 @@
+(define-module (emulators)
+ #:use-module (ice-9 match)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix svn-download)
+ #:use-module (guix hg-download)
+ #:use-module (guix build-system cmake)
+ #:use-module (guix utils)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages sdl)
+ #:use-module (gnu packages emulators)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages networking)
+ #:use-module (gnu packages game-development)
+ #:use-module (gnu packages pretty-print)
+ #:use-module (gnu packages admin)
+ #:use-module (gnu packages algebra)
+ #:use-module (gnu packages assembly)
+ #:use-module (gnu packages audio)
+ #:use-module (gnu packages autogen)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages backup)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages boost)
+ #:use-module (gnu packages cdrom)
+ #:use-module (gnu packages check)
+ #:use-module (gnu packages cmake)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages containers)
+ #:use-module (gnu packages cross-base)
+ #:use-module (gnu packages curl)
+ #:use-module (gnu packages digest)
+ #:use-module (gnu packages engineering)
+ #:use-module (gnu packages elf)
+ #:use-module (gnu packages flex)
+ #:use-module (gnu packages fltk)
+ #:use-module (gnu packages fonts)
+ #:use-module (gnu packages fontutils)
+ #:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages fribidi)
+ #: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 gnome)
+ #:use-module (gnu packages graphics)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages image)
+ #:use-module (gnu packages libedit)
+ #:use-module (gnu packages libusb)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages lua)
+ #:use-module (gnu packages maths)
+ #:use-module (gnu packages mp3)
+ #:use-module (gnu packages music)
+ #:use-module (gnu packages ncurses)
+ #:use-module (gnu packages networking)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages pretty-print)
+ #:use-module (gnu packages pulseaudio)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages qt)
+ #:use-module (gnu packages sdl)
+ #:use-module (gnu packages sphinx)
+ #:use-module (gnu packages sqlite)
+ #:use-module (gnu packages texinfo)
+ #:use-module (gnu packages textutils)
+ #:use-module (gnu packages tls)
+ #:use-module (gnu packages upnp)
+ #:use-module (gnu packages video)
+ #:use-module (gnu packages vulkan)
+ #:use-module (gnu packages xdisorg)
+ #:use-module (gnu packages xiph)
+ #:use-module (gnu packages xml)
+ #:use-module (gnu packages xorg)
+ #:use-module (gnu packages web)
+ )
+
+(define-public dolphin-emu-next
+ (let ((commit "0afbeae70c94b72318035c300ef085d4753f7462")
+ (revision "13669"))
+ (package
+ (inherit dolphin-emu)
+ (name "dolphin-emu-next")
+ (inputs
+ (list alsa-lib
+ ao
+ bluez
+ bzip2
+ cubeb
+ curl
+ enet-1.3.18
+ eudev
+ ffmpeg-4
+ fmt-10
+ font-wqy-microhei
+ freetype
+ glew
+ glib
+ glu
+ gtk+-2
+ hidapi
+ libevdev
+ libpng
+ libusb
+ libx11
+ libxi
+ libxrandr
+ lzo
+ mbedtls-lts
+ mesa
+ miniupnpc
+ minizip-ng
+ openal
+ pugixml
+ pulseaudio
+ qtbase
+ qtsvg
+ sdl2-2.30.9
+ sfml-3
+ soil
+ soundtouch-1/integer-samples
+ vulkan-loader
+ xxhash
+ zlib
+ libxcursor
+ libxi
+ `(,zstd "lib")))
+
+ (version (git-version "5.0" revision commit))
+
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dolphin-emu/dolphin")
+ (recursive? #t)
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0y803ffir4gl93sh6q0rrjzig949snxzxiayzjqcfysvvqbwkfkw"))
+ (modules '((guix build utils)
+ (ice-9 regex)))
+ (snippet
+ '(begin
+ ;; Remove external stuff we don't need.
+ (for-each (lambda (dir)
+ (delete-file-recursively
+ (string-append "Externals/" dir)))
+ '(
+ ;"LZO" "OpenAL" "Qt" "SFML" "bzip2"
+ "LZO" "OpenAL" "Qt" "bzip2"
+ ;; XXX: Attempting to use the vulkan-headers package
+ ;; results in "error:
+ ;; ‘VK_PRESENT_MODE_RANGE_SIZE_KHR’ was not declared
+ ;; in this scope".
+ ;;"Vulkan"
+ "cubeb" "curl" "enet"
+ ;"ffmpeg" "fmt" "gettext"
+ "fmt" "gettext"
+ ;; XXX: Attempting to use an unbundled glslang at the
+ ;; exact commit used by Dolphin still results in
+ ;; "error: ‘DefaultTBuiltInResource’ is not a member
+ ;; of ‘glslang’".
+ ;;"glslang"
+ ;; XXX: Googletest cannot currently easily be
+ ;; unbundled, as there are missing linking
+ ;; directives.
+ ;;"gtest"
+ ;"hidapi" "libpng" "libusb" "mbedtls"
+ "hidapi" "libusb" "mbedtls"
+ ;"miniupnpc" "minizip" "MoltenVK" "pugixml"
+ "miniupnpc" "MoltenVK" "pugixml"
+ ;"soundtouch"
+ ;"xxhash" "zlib" "zstd"
+ "xxhash" "zstd"
+ ))
+ ;; Clean up the source.
+ (for-each delete-file
+ (find-files
+ "."
+ (lambda (file _)
+ (and (string-match "\\.(bin|dsy|exe|jar|rar)$" file)
+ ;; Preserve the important wc24 .bin
+ ;; configuration *data* files.
+ (not (member (basename file)
+ '("misc.bin"
+ "nwc24dl.bin"
+ "nwc24fl.bin"
+ "nwc24fls.bin")))))))
+ ;; Do not attempt to include now-missing directories.
+ (substitute* "CMakeLists.txt"
+ ((".*add_subdirectory.*Externals/enet.*") "")
+ ((".*add_subdirectory.*Externals/soundtouch.*") "")
+ ((".*add_subdirectory.*Externals/xxhash.*") ""))))
+ ;(patches (search-patches "dolphin-emu-data.patch")
+ )))))
+
+(define-public sdl2-2.30.9
+ (package
+ (inherit sdl2)
+ (name "sdl2-2.30.9")
+ (version "2.30.9")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://libsdl.org/release/SDL2-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "197bdcfnnsd4k7q91y518kari0p3rcqbdfq40zsn79w73kvp9d94"))))
+ ))
+
+(define-public enet-1.3.18
+ (package
+ (inherit enet)
+ (name "enet-1.3.18")
+ (version "1.3.18")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://enet.bespin.org/download/"
+ "enet-" version ".tar.gz"))
+ (sha256
+ (base32 "0djxz2j8248bsvbrs42vr39fhxlrqr3lqbhzs7yb92ync19hr2ia"))))
+ ))
+
+(define-public sfml-3
+ (package
+ (inherit sfml)
+ (name "sfml-3")
+ (version "3.0.0")
+ (inputs (modify-inputs (package-inputs sfml)
+ (prepend libxcursor libxi miniaudio)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/SFML/SFML")
+ (recursive? #t)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0y37cmpp490gcibajigxsbjc6icggqv40jrhzj2kwygpc0ppzb3v"))
+ (modules '((guix build utils)))
+ ;(snippet
+ ; '(begin
+ ; ;; Ensure system libraries are used.
+ ; (delete-file-recursively "extlibs")
+ ; #t))
+ ))
+ ))
+
+(define-public miniaudio
+ (package
+ (name "miniaudio")
+ (version "0.11.22")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mackron/miniaudio")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1pjaiq71x24n9983vkhjxrsbraa24053h727db22b1rb2xyfrzm3"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'install
+ (lambda _
+ (let ((out #$output))
+ ;; Ensure the output directory exists
+ (mkdir-p (string-append out "/lib"))
+ ;; Copy the static libraries to the output directory
+ (for-each (lambda (file)
+ (copy-file file (string-append out "/lib/" file))) ; Ensure the destination is a file
+ '("libminiaudio.a"
+ "libminiaudio_channel_combiner_node.a"
+ "libminiaudio_channel_separator_node.a"
+ "libminiaudio_ltrim_node.a"
+ "libminiaudio_reverb_node.a"
+ "libminiaudio_vocoder_node.a"))))))))
+ (synopsis "Audio playback and capture library written in C, in a single source file.")
+ (description "miniaudio is written in C with no dependencies except the standard library and should compile clean on all major compilers without the need to install any additional development packages. All major desktop and mobile platforms are supported.")
+ (home-page "https://miniaud.io/")
+ (license license:expat)))