nixpkgs/pkgs/misc/emulators/dolphin-emu/default.nix

123 lines
2.5 KiB
Nix
Raw Normal View History

2020-04-04 06:55:30 +00:00
{ stdenv
, lib
, fetchpatch
2021-01-17 02:30:45 +00:00
, pkg-config
2020-04-04 06:55:30 +00:00
, cmake
, bluez
, ffmpeg_3
2020-04-04 06:55:30 +00:00
, libao
, gtk2
, glib
, libGLU
, libGL
, gettext
, libpthreadstubs
, libXrandr
, libXext
, readline
, openal
, libXdmcp
, portaudio
, fetchFromGitHub
, libusb1
2020-04-04 06:55:30 +00:00
, libevdev
, wxGTK30
, soundtouch
, miniupnpc
, mbedtls
, curl
, lzo
, sfml
, libpulseaudio ? null
}:
stdenv.mkDerivation rec {
pname = "dolphin-emu";
2016-06-27 03:05:54 +00:00
version = "5.0";
src = fetchFromGitHub {
2020-04-04 06:55:30 +00:00
owner = "dolphin-emu";
repo = "dolphin";
rev = version;
2016-06-27 03:05:54 +00:00
sha256 = "07mlfnh0hwvk6xarcg315x7z2j0qbg9g7cm040df9c8psiahc3g6";
};
2019-08-22 06:30:00 +00: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 01:05:03 +00: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 06:30:00 +00:00
];
postPatch = ''
substituteInPlace Source/Core/VideoBackends/OGL/RasterFont.cpp \
--replace " CHAR_WIDTH " " CHARWIDTH "
'';
2019-08-22 06:30:00 +00: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"
];
2020-04-04 06:55:30 +00:00
nativeBuildInputs = [
2021-01-17 02:30:45 +00:00
pkg-config
cmake
2020-04-04 06:55:30 +00:00
];
buildInputs = [
bluez
ffmpeg_3
2020-04-04 06:55:30 +00:00
libao
libGLU
libGL
gtk2
glib
gettext
libpthreadstubs
libXrandr
libXext
readline
openal
libevdev
libXdmcp
portaudio
libpulseaudio
libevdev
libXdmcp
portaudio
libusb1
2020-04-04 06:55:30 +00:00
libpulseaudio
wxGTK30
soundtouch
miniupnpc
mbedtls
curl
lzo
sfml
];
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
install -D $src/Data/51-usb-device.rules $out/etc/udev/rules.d/51-usb-device.rules
'';
meta = with lib; {
2020-04-04 06:55:30 +00:00
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 03:05:54 +00:00
# x86_32 is an unsupported platform.
# Enable generic build if you really want a JIT-less binary.
platforms = [ "x86_64-linux" ];
};
}