diff --git a/pkgs/misc/emulators/dolphin-emu/master.nix b/pkgs/misc/emulators/dolphin-emu/master.nix index 06b1221dccb8..d5133c8618d7 100644 --- a/pkgs/misc/emulators/dolphin-emu/master.nix +++ b/pkgs/misc/emulators/dolphin-emu/master.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, makeDesktopItem, pkg-config, cmake +{ lib, stdenv, fetchFromGitHub, pkg-config, cmake , wrapQtAppsHook, qtbase, bluez, ffmpeg, libao, libGLU, libGL, pcre, gettext , libXrandr, libusb1, lzo, libpthreadstubs, libXext, libXxf86vm, libXinerama , libSM, libXdmcp, readline, openal, udev, libevdev, portaudio, curl, alsa-lib @@ -8,18 +8,7 @@ # - Inputs used for Darwin , CoreBluetooth, ForceFeedback, IOKit, OpenGL, libpng, hidapi }: -let - desktopItem = makeDesktopItem { - name = "dolphin-emu-master"; - exec = "dolphin-emu-master"; - icon = "dolphin-emu"; - comment = "A Wii/GameCube Emulator"; - desktopName = "Dolphin Emulator (master)"; - genericName = "Wii/GameCube Emulator"; - categories = "Game;Emulator;"; - startupNotify = "false"; - }; -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "dolphin-emu"; version = "5.0-15260"; @@ -57,6 +46,9 @@ in stdenv.mkDerivation rec { qtWrapperArgs = lib.optionals stdenv.isLinux [ "--prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib" + # https://bugs.dolphin-emu.org/issues/11807 + # The .desktop file should already set this, but Dolphin may be launched in other ways + "--set QT_QPA_PLATFORM xcb" ]; # - Allow Dolphin to use nix-provided libraries instead of building them @@ -68,10 +60,7 @@ in stdenv.mkDerivation rec { CMakeLists.txt ''; - postInstall = '' - cp -r ${desktopItem}/share/applications $out/share - ln -sf $out/bin/dolphin-emu $out/bin/dolphin-emu-master - '' + lib.optionalString stdenv.hostPlatform.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' install -D $src/Data/51-usb-device.rules $out/etc/udev/rules.d/51-usb-device.rules ''; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 48d1c21445fd..35d12ac05f4b 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -202,6 +202,8 @@ mapAliases ({ dnnl = oneDNN; # added 2020-04-22 docbook5_xsl = docbook_xsl_ns; # added 2018-04-25 docbook_xml_xslt = docbook_xsl; # added 2018-04-25 + dolphinEmu = dolphin-emu; # added 2021-11-10 + dolphinEmuMaster = dolphin-emu-beta; # added 2021-11-10 dotnet-netcore = dotnet-runtime; # added 2021-10-07 double_conversion = double-conversion; # 2017-11-22 docker_compose = docker-compose; # 2018-11-10 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index eb48b682875b..07a421260dad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4578,8 +4578,8 @@ with pkgs; dotnetfx40 = callPackage ../development/libraries/dotnetfx40 { }; - dolphinEmu = callPackage ../misc/emulators/dolphin-emu { }; - dolphinEmuMaster = qt5.callPackage ../misc/emulators/dolphin-emu/master.nix { + dolphin-emu = callPackage ../misc/emulators/dolphin-emu { }; + dolphin-emu-beta = qt5.callPackage ../misc/emulators/dolphin-emu/master.nix { inherit (darwin.apple_sdk.frameworks) CoreBluetooth ForceFeedback IOKit OpenGL; };