dolphinEmuMaster: use wrapQtAppsHook

This commit is contained in:
ash lea 2019-08-21 23:33:04 -07:00 committed by Cray Elliott
parent 4a7992d2b8
commit bd8f12024b
2 changed files with 14 additions and 14 deletions

View File

@ -1,8 +1,9 @@
{ stdenv, fetchFromGitHub, makeWrapper, makeDesktopItem, pkgconfig, cmake, qt5 { lib, stdenv, fetchFromGitHub, makeDesktopItem, pkgconfig, cmake
, bluez, ffmpeg, libao, libGLU_combined, pcre, gettext, libXrandr, libusb, lzo , wrapQtAppsHook, qtbase, bluez, ffmpeg, libao, libGLU_combined, pcre, gettext
, libpthreadstubs, libXext, libXxf86vm, libXinerama, libSM, libXdmcp, readline , libXrandr, libusb, lzo, libpthreadstubs, libXext, libXxf86vm, libXinerama
, openal, udev, libevdev, portaudio, curl, alsaLib, miniupnpc, enet, mbedtls , libSM, libXdmcp, readline, openal, udev, libevdev, portaudio, curl, alsaLib
, soundtouch, sfml, vulkan-loader ? null, libpulseaudio ? null , miniupnpc, enet, mbedtls, soundtouch, sfml
, vulkan-loader ? null, libpulseaudio ? null
# - Inputs used for Darwin # - Inputs used for Darwin
, CoreBluetooth, ForceFeedback, IOKit, OpenGL, libpng, hidapi }: , CoreBluetooth, ForceFeedback, IOKit, OpenGL, libpng, hidapi }:
@ -31,13 +32,13 @@ in stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
nativeBuildInputs = [ cmake pkgconfig ] nativeBuildInputs = [ cmake pkgconfig ]
++ stdenv.lib.optionals stdenv.isLinux [ makeWrapper ]; ++ lib.optional stdenv.isLinux wrapQtAppsHook;
buildInputs = [ buildInputs = [
curl ffmpeg libao libGLU_combined pcre gettext libpthreadstubs libpulseaudio curl ffmpeg libao libGLU_combined pcre gettext libpthreadstubs libpulseaudio
libXrandr libXext libXxf86vm libXinerama libSM readline openal libXdmcp lzo libXrandr libXext libXxf86vm libXinerama libSM readline openal libXdmcp lzo
portaudio libusb libpng hidapi miniupnpc enet mbedtls soundtouch sfml portaudio libusb libpng hidapi miniupnpc enet mbedtls soundtouch sfml
qt5.qtbase qtbase
] ++ stdenv.lib.optionals stdenv.isLinux [ ] ++ stdenv.lib.optionals stdenv.isLinux [
bluez udev libevdev alsaLib vulkan-loader bluez udev libevdev alsaLib vulkan-loader
] ++ stdenv.lib.optionals stdenv.isDarwin [ ] ++ stdenv.lib.optionals stdenv.isDarwin [
@ -54,8 +55,12 @@ in stdenv.mkDerivation rec {
"-DOSX_USE_DEFAULT_SEARCH_PATH=True" "-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 # - Allow Dolphin to use nix-provided libraries instead of building them
preConfigure = '' postPatch = ''
sed -i -e 's,DISTRIBUTOR "None",DISTRIBUTOR "NixOS",g' CMakeLists.txt sed -i -e 's,DISTRIBUTOR "None",DISTRIBUTOR "NixOS",g' CMakeLists.txt
'' + stdenv.lib.optionalString stdenv.isDarwin '' '' + stdenv.lib.optionalString stdenv.isDarwin ''
sed -i -e 's,if(NOT APPLE),if(true),g' CMakeLists.txt sed -i -e 's,if(NOT APPLE),if(true),g' CMakeLists.txt
@ -66,11 +71,6 @@ in stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
cp -r ${desktopItem}/share/applications $out/share cp -r ${desktopItem}/share/applications $out/share
ln -sf $out/bin/dolphin-emu $out/bin/dolphin-emu-master 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; { meta = with stdenv.lib; {

View File

@ -2663,7 +2663,7 @@ in
dotnetfx40 = callPackage ../development/libraries/dotnetfx40 { }; dotnetfx40 = callPackage ../development/libraries/dotnetfx40 { };
dolphinEmu = callPackage ../misc/emulators/dolphin-emu { }; 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; inherit (darwin.apple_sdk.frameworks) CoreBluetooth ForceFeedback IOKit OpenGL;
}; };