3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/misc/emulators/dolphin-emu/default.nix

64 lines
2.3 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchpatch, pkgconfig, cmake, bluez, ffmpeg, libao, gtk2, glib
2019-08-22 07:30:00 +01:00
, libGLU_combined , gettext, libpthreadstubs, libXrandr, libXext, readline
, openal , libXdmcp, portaudio, fetchFromGitHub, libusb, libevdev
, wxGTK30, soundtouch, miniupnpc, mbedtls, curl, lzo, sfml
, libpulseaudio ? null }:
stdenv.mkDerivation rec {
pname = "dolphin-emu";
2016-06-27 04:05:54 +01:00
version = "5.0";
src = fetchFromGitHub {
owner = "dolphin-emu";
repo = "dolphin";
rev = version;
sha256 = "07mlfnh0hwvk6xarcg315x7z2j0qbg9g7cm040df9c8psiahc3g6";
};
2019-08-22 07:30:00 +01:00
patches = [
# Fix build with soundtouch 2.1.2
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/dolphin-emu/raw/a1b91fdf94981e12c8889a02cba0ec2267d0f303/f/dolphin-emu-5.0-soundtouch-exception-fix.patch";
name = "dolphin-emu-5.0-soundtouch-exception-fix.patch";
sha256 = "0yd3l46nja5qiknnl30ryad98f3v8911jwnr67hn61dzx2kwbbaw";
})
2019-09-10 02:05:03 +01:00
# Fix build with gcc 8
(fetchpatch {
url = "https://salsa.debian.org/games-team/dolphin-emu/raw/9b7b4aeac1b60dcf28bdcafbed6bc498b2aeb0ad/debian/patches/03_gcc8.patch";
name = "03_gcc8.patch";
sha256 = "1da95gb8c95kd5cjhdvg19cv2z863lj3va5gx3bqc7g8r36glqxr";
})
2019-08-22 07:30:00 +01:00
];
postPatch = ''
substituteInPlace Source/Core/VideoBackends/OGL/RasterFont.cpp \
--replace " CHAR_WIDTH " " CHARWIDTH "
'';
2019-08-22 07:30:00 +01:00
cmakeFlags = [
"-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
"-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
"-DGTK2_INCLUDE_DIRS=${gtk2.dev}/include/gtk-2.0"
"-DENABLE_LTO=True"
];
enableParallelBuilding = true;
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ cmake bluez ffmpeg libao libGLU_combined gtk2 glib
gettext libpthreadstubs libXrandr libXext readline openal
libevdev libXdmcp portaudio libusb libpulseaudio
libevdev libXdmcp portaudio libusb libpulseaudio
wxGTK30 soundtouch miniupnpc mbedtls curl lzo sfml ];
meta = with lib; {
homepage = https://dolphin-emu.org/;
description = "Gamecube/Wii/Triforce emulator for x86_64 and ARMv8";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ MP2E ashkitten ];
2016-06-27 04:05:54 +01:00
# x86_32 is an unsupported platform.
# Enable generic build if you really want a JIT-less binary.
platforms = [ "x86_64-linux" ];
};
}