From c0b5213df3667ee71aa7c44d663229fb9f9f880b Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 22 Jun 2023 08:03:23 +0300 Subject: [PATCH] dolphin-emu: fix build on darwin (#238959) --- .../emulators/dolphin-emu/default.nix | 24 +++++++++---------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/emulators/dolphin-emu/default.nix b/pkgs/applications/emulators/dolphin-emu/default.nix index c341d2a58725..ba7fc2cfb8f7 100644 --- a/pkgs/applications/emulators/dolphin-emu/default.nix +++ b/pkgs/applications/emulators/dolphin-emu/default.nix @@ -66,12 +66,21 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ + stdenv.cc cmake pkg-config wrapQtAppsHook ]; - buildInputs = [ + buildInputs = lib.optionals stdenv.isDarwin [ + CoreBluetooth + ForceFeedback + IOBluetooth + IOKit + moltenvk + OpenGL + VideoToolbox + ] ++ [ bzip2 cubeb curl @@ -79,7 +88,6 @@ stdenv.mkDerivation rec { ffmpeg fmt_8 hidapi - libGL libiconv libpulseaudio libspng @@ -99,20 +107,13 @@ stdenv.mkDerivation rec { alsa-lib bluez libevdev + libGL libXext libXrandr # FIXME: Remove comment on next mgba version #mgba # Derivation doesn't support Darwin udev vulkan-loader - ] ++ lib.optionals stdenv.isDarwin [ - CoreBluetooth - ForceFeedback - IOBluetooth - IOKit - moltenvk - OpenGL - VideoToolbox ]; cmakeFlags = [ @@ -124,6 +125,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals stdenv.isDarwin [ "-DOSX_USE_DEFAULT_SEARCH_PATH=True" "-DUSE_BUNDLED_MOLTENVK=OFF" + "-DMACOS_CODE_SIGNING=OFF" # Bundles the application folder into a standalone executable, so we cannot devendor libraries "-DSKIP_POSTPROCESS_BUNDLE=ON" # Needs xcode so compilation fails with it enabled. We would want the version to be fixed anyways. @@ -184,7 +186,5 @@ stdenv.mkDerivation rec { xfix ivar ]; - # Requires both LLVM and SDK bump - broken = stdenv.isDarwin && stdenv.isx86_64; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 21cd109844f4..2cd863a1871b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2544,7 +2544,7 @@ with pkgs; inherit (darwin.apple_sdk_11_0.frameworks) CoreBluetooth ForceFeedback IOBluetooth IOKit OpenGL VideoToolbox; inherit (darwin) moltenvk; stdenv = - if stdenv.isDarwin && stdenv.isAarch64 then llvmPackages_14.stdenv + if stdenv.isDarwin then darwin.apple_sdk_11_0.llvmPackages_14.stdenv else stdenv; };