From 854b6b28813a18b2fdb3077dde9c193dcb2f1988 Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Tue, 30 Apr 2024 11:41:29 +0200 Subject: dolphin-emu: 5.0-21088 -> 5.0-21460 --- .../applications/emulators/dolphin-emu/default.nix | 42 ++++++++++------------ .../emulators/dolphin-emu/find-minizip-ng.patch | 8 ++--- 2 files changed, 22 insertions(+), 28 deletions(-) (limited to 'pkgs/applications/emulators') diff --git a/pkgs/applications/emulators/dolphin-emu/default.nix b/pkgs/applications/emulators/dolphin-emu/default.nix index 568f43d3564cc..f00d6c9c05a0f 100644 --- a/pkgs/applications/emulators/dolphin-emu/default.nix +++ b/pkgs/applications/emulators/dolphin-emu/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch , cmake , pkg-config , wrapQtAppsHook @@ -59,45 +58,30 @@ stdenv.mkDerivation rec { pname = "dolphin-emu"; - version = "5.0-21088"; + version = "5.0-21460"; src = fetchFromGitHub { owner = "dolphin-emu"; repo = "dolphin"; - rev = "9240f579eab18a2f67eef23846a6b508393d0e6c"; - hash = "sha256-lOiDbEQZoi9Bsiyta/w+B1VXNNW4qST2cBZekqo5dDA="; + rev = "a9544510468740b77cf06ef28daaa65fe247fd32"; + hash = "sha256-mhD7Uaqi8GzHdR7Y81TspvCnrZH2evWuWFgXMQ2c8g0="; fetchSubmodules = true; }; patches = [ - # Remove when merged https://github.com/dolphin-emu/dolphin/pull/12070 + # TODO: Remove when merged https://github.com/dolphin-emu/dolphin/pull/12736 ./find-minizip-ng.patch - - # fix buidl w/ glibc-2.39 - (fetchpatch { - url = "https://github.com/dolphin-emu/dolphin/commit/3da2e15e6b95f02f66df461e87c8b896e450fdab.patch"; - hash = "sha256-+8yGF412wQUYbyEuYWd41pgOgEbhCaezexxcI5CNehc="; - }) ]; strictDeps = true; nativeBuildInputs = [ - stdenv.cc cmake pkg-config wrapQtAppsHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ - CoreBluetooth - ForceFeedback - IOBluetooth - IOKit - moltenvk - OpenGL - VideoToolbox - ] ++ [ + buildInputs = [ bzip2 cubeb curl @@ -123,7 +107,9 @@ stdenv.mkDerivation rec { SDL2 sfml xxHash - xz # LibLZMA + xz + # Causes linker errors with minizip-ng, prefer vendored. Possible reason why: https://github.com/dolphin-emu/dolphin/pull/12070#issuecomment-1677311838 + #zlib-ng ] ++ lib.optionals stdenv.isLinux [ alsa-lib bluez @@ -135,6 +121,14 @@ stdenv.mkDerivation rec { #mgba # Derivation doesn't support Darwin udev vulkan-loader + ] ++ lib.optionals stdenv.isDarwin [ + CoreBluetooth + ForceFeedback + IOBluetooth + IOKit + moltenvk + OpenGL + VideoToolbox ]; cmakeFlags = [ @@ -163,8 +157,8 @@ stdenv.mkDerivation rec { # Use nix-provided libraries instead of submodules postPatch = lib.optionalString stdenv.isDarwin '' substituteInPlace CMakeLists.txt \ - --replace "if(NOT APPLE)" "if(true)" \ - --replace "if(LIBUSB_FOUND AND NOT APPLE)" "if(LIBUSB_FOUND)" + --replace-fail "if(NOT APPLE)" "if(true)" \ + --replace-fail "if(LIBUSB_FOUND AND NOT APPLE)" "if(LIBUSB_FOUND)" ''; postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' diff --git a/pkgs/applications/emulators/dolphin-emu/find-minizip-ng.patch b/pkgs/applications/emulators/dolphin-emu/find-minizip-ng.patch index b5c64d6e713d2..b8a6d81aed554 100644 --- a/pkgs/applications/emulators/dolphin-emu/find-minizip-ng.patch +++ b/pkgs/applications/emulators/dolphin-emu/find-minizip-ng.patch @@ -1,11 +1,11 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index ee44d04458..2fa6bd8a10 100644 +index fb37788513..289a25fa57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -678,7 +678,7 @@ dolphin_find_optional_system_library_pkgconfig(ZSTD libzstd>=1.4.0 zstd::zstd Ex - - dolphin_find_optional_system_library_pkgconfig(ZLIB zlib-ng ZLIB::ZLIB Externals/zlib-ng) +@@ -676,7 +676,7 @@ dolphin_find_optional_system_library_pkgconfig(ZLIB zlib-ng ZLIB::ZLIB Externals + # https://github.com/zlib-ng/minizip-ng/commit/6c5f265a55f1a12a7a016cd2962feff91cff5d2e + add_definitions(-DMZ_COMPAT_VERSION=110) # This macro is for forwards compatibility with 4.0.4+ -dolphin_find_optional_system_library_pkgconfig(MINIZIP minizip>=3.0.0 minizip::minizip Externals/minizip) +dolphin_find_optional_system_library_pkgconfig(MINIZIP minizip-ng>=3.0.0 minizip::minizip Externals/minizip) -- cgit 1.4.1 From d0f6f51cb8f03b939ab2587b44524b2bcceb63ba Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 23 May 2024 07:10:33 +0200 Subject: dolphin-emu: fix build on x86_64-darwin --- pkgs/applications/emulators/dolphin-emu/default.nix | 7 ------- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'pkgs/applications/emulators') diff --git a/pkgs/applications/emulators/dolphin-emu/default.nix b/pkgs/applications/emulators/dolphin-emu/default.nix index f00d6c9c05a0f..c9f1e1572ab13 100644 --- a/pkgs/applications/emulators/dolphin-emu/default.nix +++ b/pkgs/applications/emulators/dolphin-emu/default.nix @@ -154,13 +154,6 @@ stdenv.mkDerivation rec { "--set QT_QPA_PLATFORM xcb" ]; - # Use nix-provided libraries instead of submodules - postPatch = lib.optionalString stdenv.isDarwin '' - substituteInPlace CMakeLists.txt \ - --replace-fail "if(NOT APPLE)" "if(true)" \ - --replace-fail "if(LIBUSB_FOUND AND NOT APPLE)" "if(LIBUSB_FOUND)" - ''; - postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' install -D $src/Data/51-usb-device.rules $out/etc/udev/rules.d/51-usb-device.rules '' + lib.optionalString stdenv.hostPlatform.isDarwin '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c8e12b5370c58..48f09499cb9c7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2826,6 +2826,7 @@ with pkgs; ### APPLICATIONS/EMULATORS/DOLPHIN-EMU dolphin-emu = qt6Packages.callPackage ../applications/emulators/dolphin-emu { + stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; inherit (darwin.apple_sdk_11_0.frameworks) CoreBluetooth ForceFeedback IOBluetooth IOKit OpenGL VideoToolbox; inherit (darwin) moltenvk; }; -- cgit 1.4.1