diff --git a/pkgs/misc/emulators/dolphin-emu/master.nix b/pkgs/misc/emulators/dolphin-emu/master.nix index 4f48f1248f4..cc072df72f0 100644 --- a/pkgs/misc/emulators/dolphin-emu/master.nix +++ b/pkgs/misc/emulators/dolphin-emu/master.nix @@ -1,8 +1,9 @@ -{ stdenv, fetchFromGitHub, makeWrapper, makeDesktopItem, pkgconfig, cmake, qt5 -, bluez, ffmpeg, libao, libGLU_combined, pcre, gettext, libXrandr, libusb, lzo -, libpthreadstubs, libXext, libXxf86vm, libXinerama, libSM, libXdmcp, readline -, openal, udev, libevdev, portaudio, curl, alsaLib, miniupnpc, enet, mbedtls -, soundtouch, sfml, vulkan-loader ? null, libpulseaudio ? null +{ lib, stdenv, fetchFromGitHub, makeDesktopItem, pkgconfig, cmake +, wrapQtAppsHook, qtbase, bluez, ffmpeg, libao, libGLU_combined, pcre, gettext +, libXrandr, libusb, lzo, libpthreadstubs, libXext, libXxf86vm, libXinerama +, libSM, libXdmcp, readline, openal, udev, libevdev, portaudio, curl, alsaLib +, miniupnpc, enet, mbedtls, soundtouch, sfml +, vulkan-loader ? null, libpulseaudio ? null # - Inputs used for Darwin , CoreBluetooth, ForceFeedback, IOKit, OpenGL, libpng, hidapi }: @@ -31,13 +32,13 @@ in stdenv.mkDerivation rec { enableParallelBuilding = true; nativeBuildInputs = [ cmake pkgconfig ] - ++ stdenv.lib.optionals stdenv.isLinux [ makeWrapper ]; + ++ lib.optional stdenv.isLinux wrapQtAppsHook; buildInputs = [ curl ffmpeg libao libGLU_combined pcre gettext libpthreadstubs libpulseaudio libXrandr libXext libXxf86vm libXinerama libSM readline openal libXdmcp lzo portaudio libusb libpng hidapi miniupnpc enet mbedtls soundtouch sfml - qt5.qtbase + qtbase ] ++ stdenv.lib.optionals stdenv.isLinux [ bluez udev libevdev alsaLib vulkan-loader ] ++ stdenv.lib.optionals stdenv.isDarwin [ @@ -54,8 +55,12 @@ in stdenv.mkDerivation rec { "-DOSX_USE_DEFAULT_SEARCH_PATH=True" ]; + qtWrapperArgs = lib.optionals stdenv.isLinux [ + "--prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib" + ]; + # - Allow Dolphin to use nix-provided libraries instead of building them - preConfigure = '' + postPatch = '' sed -i -e 's,DISTRIBUTOR "None",DISTRIBUTOR "NixOS",g' CMakeLists.txt '' + stdenv.lib.optionalString stdenv.isDarwin '' sed -i -e 's,if(NOT APPLE),if(true),g' CMakeLists.txt @@ -66,11 +71,6 @@ in stdenv.mkDerivation rec { postInstall = '' cp -r ${desktopItem}/share/applications $out/share ln -sf $out/bin/dolphin-emu $out/bin/dolphin-emu-master - '' + stdenv.lib.optionalString stdenv.isLinux '' - wrapProgram $out/bin/dolphin-emu-nogui \ - --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib - wrapProgram $out/bin/dolphin-emu \ - --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib ''; meta = with stdenv.lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f107493bb3d..c4498ce8b13 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2663,7 +2663,7 @@ in dotnetfx40 = callPackage ../development/libraries/dotnetfx40 { }; dolphinEmu = callPackage ../misc/emulators/dolphin-emu { }; - dolphinEmuMaster = callPackage ../misc/emulators/dolphin-emu/master.nix { + dolphinEmuMaster = qt5.callPackage ../misc/emulators/dolphin-emu/master.nix { inherit (darwin.apple_sdk.frameworks) CoreBluetooth ForceFeedback IOKit OpenGL; };