dolphin-emu: fix build on darwin (#238959)

This commit is contained in:
Weijia Wang 2023-06-22 08:03:23 +03:00 committed by GitHub
parent 42075be601
commit c0b5213df3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View File

@ -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;
};
}

View File

@ -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;
};