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 = [ nativeBuildInputs = [
stdenv.cc
cmake cmake
pkg-config pkg-config
wrapQtAppsHook wrapQtAppsHook
]; ];
buildInputs = [ buildInputs = lib.optionals stdenv.isDarwin [
CoreBluetooth
ForceFeedback
IOBluetooth
IOKit
moltenvk
OpenGL
VideoToolbox
] ++ [
bzip2 bzip2
cubeb cubeb
curl curl
@ -79,7 +88,6 @@ stdenv.mkDerivation rec {
ffmpeg ffmpeg
fmt_8 fmt_8
hidapi hidapi
libGL
libiconv libiconv
libpulseaudio libpulseaudio
libspng libspng
@ -99,20 +107,13 @@ stdenv.mkDerivation rec {
alsa-lib alsa-lib
bluez bluez
libevdev libevdev
libGL
libXext libXext
libXrandr libXrandr
# FIXME: Remove comment on next mgba version # FIXME: Remove comment on next mgba version
#mgba # Derivation doesn't support Darwin #mgba # Derivation doesn't support Darwin
udev udev
vulkan-loader vulkan-loader
] ++ lib.optionals stdenv.isDarwin [
CoreBluetooth
ForceFeedback
IOBluetooth
IOKit
moltenvk
OpenGL
VideoToolbox
]; ];
cmakeFlags = [ cmakeFlags = [
@ -124,6 +125,7 @@ stdenv.mkDerivation rec {
] ++ lib.optionals stdenv.isDarwin [ ] ++ lib.optionals stdenv.isDarwin [
"-DOSX_USE_DEFAULT_SEARCH_PATH=True" "-DOSX_USE_DEFAULT_SEARCH_PATH=True"
"-DUSE_BUNDLED_MOLTENVK=OFF" "-DUSE_BUNDLED_MOLTENVK=OFF"
"-DMACOS_CODE_SIGNING=OFF"
# Bundles the application folder into a standalone executable, so we cannot devendor libraries # Bundles the application folder into a standalone executable, so we cannot devendor libraries
"-DSKIP_POSTPROCESS_BUNDLE=ON" "-DSKIP_POSTPROCESS_BUNDLE=ON"
# Needs xcode so compilation fails with it enabled. We would want the version to be fixed anyways. # 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 xfix
ivar 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.apple_sdk_11_0.frameworks) CoreBluetooth ForceFeedback IOBluetooth IOKit OpenGL VideoToolbox;
inherit (darwin) moltenvk; inherit (darwin) moltenvk;
stdenv = stdenv =
if stdenv.isDarwin && stdenv.isAarch64 then llvmPackages_14.stdenv if stdenv.isDarwin then darwin.apple_sdk_11_0.llvmPackages_14.stdenv
else stdenv; else stdenv;
}; };