dolphinEmuMaster: Add options to build gui with wx or qt

This commit is contained in:
Luke Adams 2017-11-11 13:46:53 -06:00 committed by Cray Elliott
parent a44253ec65
commit 51e53e0a71

View File

@ -3,12 +3,21 @@
, openal, libXdmcp, portaudio, libusb, libevdev
, libpulseaudio ? null
, curl
, qt5
# - Inputs used for Darwin
, CoreBluetooth, cf-private, ForceFeedback, IOKit, OpenGL
, wxGTK
, libpng
, hidapi
# options
, dolphin-wxgui ? true
, dolphin-qtgui ? false
}:
# XOR: ensure only wx XOR qt are enabled
assert dolphin-wxgui || dolphin-qtgui;
assert !(dolphin-wxgui && dolphin-qtgui);
stdenv.mkDerivation rec {
name = "dolphin-emu-20170902";
@ -24,7 +33,8 @@ stdenv.mkDerivation rec {
"-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
"-DGTK2_INCLUDE_DIRS=${gtk2.dev}/include/gtk-2.0"
"-DENABLE_LTO=True"
] ++ stdenv.lib.optionals stdenv.isDarwin [ "-DOSX_USE_DEFAULT_SEARCH_PATH=True" ];
] ++ stdenv.lib.optionals (!dolphin-qtgui) [ "-DENABLE_QT2=False" ]
++ stdenv.lib.optionals stdenv.isDarwin [ "-DOSX_USE_DEFAULT_SEARCH_PATH=True" ];
enableParallelBuilding = true;
@ -34,7 +44,8 @@ stdenv.mkDerivation rec {
gettext libpthreadstubs libXrandr libXext libSM readline openal
libXdmcp portaudio libusb libpulseaudio libpng hidapi
] ++ stdenv.lib.optionals stdenv.isDarwin [ wxGTK CoreBluetooth cf-private ForceFeedback IOKit OpenGL ]
++ stdenv.lib.optionals stdenv.isLinux [ bluez libevdev ];
++ stdenv.lib.optionals stdenv.isLinux [ bluez libevdev ]
++ stdenv.lib.optionals dolphin-qtgui [ qt5.qtbase ];
# - Change install path to Applications relative to $out
# - Allow Dolphin to use nix-provided libraries instead of building them