2020-04-04 07:55:30 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchpatch
|
2021-01-17 02:30:45 +00:00
|
|
|
, pkg-config
|
2020-04-04 07:55:30 +01:00
|
|
|
, cmake
|
|
|
|
, bluez
|
2020-06-07 13:39:09 +01:00
|
|
|
, ffmpeg_3
|
2020-04-04 07:55:30 +01:00
|
|
|
, libao
|
|
|
|
, gtk2
|
|
|
|
, glib
|
|
|
|
, libGLU
|
|
|
|
, libGL
|
|
|
|
, gettext
|
|
|
|
, libpthreadstubs
|
|
|
|
, libXrandr
|
|
|
|
, libXext
|
|
|
|
, readline
|
|
|
|
, openal
|
|
|
|
, libXdmcp
|
|
|
|
, portaudio
|
|
|
|
, fetchFromGitHub
|
2020-04-04 08:05:39 +01:00
|
|
|
, libusb1
|
2020-04-04 07:55:30 +01:00
|
|
|
, libevdev
|
|
|
|
, wxGTK30
|
|
|
|
, soundtouch
|
|
|
|
, miniupnpc
|
|
|
|
, mbedtls
|
|
|
|
, curl
|
|
|
|
, lzo
|
|
|
|
, sfml
|
|
|
|
, libpulseaudio ? null
|
|
|
|
}:
|
2014-09-02 09:19:44 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "dolphin-emu";
|
2016-06-27 04:05:54 +01:00
|
|
|
version = "5.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-04-04 07:55:30 +01:00
|
|
|
owner = "dolphin-emu";
|
|
|
|
repo = "dolphin";
|
|
|
|
rev = version;
|
2016-06-27 04:05:54 +01:00
|
|
|
sha256 = "07mlfnh0hwvk6xarcg315x7z2j0qbg9g7cm040df9c8psiahc3g6";
|
2014-09-02 09:19:44 +01:00
|
|
|
};
|
|
|
|
|
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
|
|
|
];
|
|
|
|
|
2017-02-21 17:52:29 +00: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"
|
|
|
|
];
|
2014-09-02 09:19:44 +01:00
|
|
|
|
2020-04-04 07:55:30 +01:00
|
|
|
nativeBuildInputs = [
|
2021-01-17 02:30:45 +00:00
|
|
|
pkg-config
|
2020-04-04 08:05:39 +01:00
|
|
|
cmake
|
2020-04-04 07:55:30 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
bluez
|
2020-06-07 13:39:09 +01:00
|
|
|
ffmpeg_3
|
2020-04-04 07:55:30 +01:00
|
|
|
libao
|
|
|
|
libGLU
|
|
|
|
libGL
|
|
|
|
gtk2
|
|
|
|
glib
|
|
|
|
gettext
|
|
|
|
libpthreadstubs
|
|
|
|
libXrandr
|
|
|
|
libXext
|
|
|
|
readline
|
|
|
|
openal
|
|
|
|
libevdev
|
|
|
|
libXdmcp
|
|
|
|
portaudio
|
|
|
|
libpulseaudio
|
|
|
|
libevdev
|
|
|
|
libXdmcp
|
|
|
|
portaudio
|
2020-04-04 08:05:39 +01:00
|
|
|
libusb1
|
2020-04-04 07:55:30 +01:00
|
|
|
libpulseaudio
|
|
|
|
wxGTK30
|
|
|
|
soundtouch
|
|
|
|
miniupnpc
|
|
|
|
mbedtls
|
|
|
|
curl
|
|
|
|
lzo
|
|
|
|
sfml
|
|
|
|
];
|
2014-09-02 09:19:44 +01:00
|
|
|
|
2020-12-03 09:26:21 +00:00
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
|
|
|
|
install -D $src/Data/51-usb-device.rules $out/etc/udev/rules.d/51-usb-device.rules
|
|
|
|
'';
|
|
|
|
|
2019-08-22 07:21:45 +01:00
|
|
|
meta = with lib; {
|
2020-04-04 07:55:30 +01:00
|
|
|
homepage = "https://dolphin-emu.org/";
|
2018-10-15 02:26:46 +01:00
|
|
|
description = "Gamecube/Wii/Triforce emulator for x86_64 and ARMv8";
|
2019-08-22 07:21:45 +01:00
|
|
|
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" ];
|
2014-09-02 09:19:44 +01:00
|
|
|
};
|
|
|
|
}
|