Unverified Commit aead7eae authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #307975 from SuperSamus/dolphin-emu-update

dolphin-emu: 5.0-21088 -> 5.0-21460
parents f69aabc5 d0f6f51c
Loading
Loading
Loading
Loading
+16 −29
Original line number Diff line number Diff line
{ 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 = [
@@ -160,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 "if(NOT APPLE)" "if(true)" \
      --replace "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 ''
+4 −4
Original line number Diff line number Diff line
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)
 
+1 −0
Original line number Diff line number Diff line
@@ -2810,6 +2810,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;
  };