From 51e53e0a71daea98efccd98b258fcbd61fb68a1b Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Sat, 11 Nov 2017 13:46:53 -0600 Subject: [PATCH] dolphinEmuMaster: Add options to build gui with wx or qt --- pkgs/misc/emulators/dolphin-emu/master.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/emulators/dolphin-emu/master.nix b/pkgs/misc/emulators/dolphin-emu/master.nix index 8275952d2ee..88e2bb1a459 100644 --- a/pkgs/misc/emulators/dolphin-emu/master.nix +++ b/pkgs/misc/emulators/dolphin-emu/master.nix @@ -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