retroarch: drop all Darwin related code
Darwin support in retroarch was broken for a long time, and it is getting worse with each subsequent update. Upstream abandoned `./configure` usage in macOS systems too for a Xcode build system. So if we want to get back decent support for retroarch in Darwin, we should migrate it to use Xcode. For now, let's just remove all this code that is not working.
This commit is contained in:
@@ -6,18 +6,15 @@
|
||||
, withVulkan ? stdenv.isLinux
|
||||
, withWayland ? stdenv.isLinux
|
||||
, alsa-lib
|
||||
, AppKit
|
||||
, dbus
|
||||
, fetchFromGitHub
|
||||
, ffmpeg_4
|
||||
, flac
|
||||
, Foundation
|
||||
, freetype
|
||||
, gamemode
|
||||
, libdrm
|
||||
, libGL
|
||||
, libGLU
|
||||
, libobjc
|
||||
, libpulseaudio
|
||||
, libv4l
|
||||
, libX11
|
||||
@@ -95,7 +92,6 @@ stdenv.mkDerivation rec {
|
||||
lib.optional enableNvidiaCgToolkit nvidia_cg_toolkit ++
|
||||
lib.optional withVulkan vulkan-loader ++
|
||||
lib.optional withWayland wayland ++
|
||||
lib.optionals stdenv.isDarwin [ libobjc AppKit Foundation ] ++
|
||||
lib.optionals stdenv.isLinux [
|
||||
alsa-lib
|
||||
dbus
|
||||
@@ -133,31 +129,10 @@ stdenv.mkDerivation rec {
|
||||
lib.optionalString (runtimeLibs != [ ]) ''
|
||||
wrapProgram $out/bin/retroarch \
|
||||
--prefix LD_LIBRARY_PATH ':' ${lib.makeLibraryPath runtimeLibs}
|
||||
'' +
|
||||
lib.optionalString stdenv.isDarwin ''
|
||||
# https://github.com/libretro/RetroArch/blob/master/retroarch-apple-packaging.sh
|
||||
app=$out/Applications/RetroArch.app
|
||||
mkdir -p $app/Contents/MacOS
|
||||
cp -r pkg/apple/OSX/* $app/Contents
|
||||
cp $out/bin/retroarch $app/Contents/MacOS
|
||||
# FIXME: using Info_Metal.plist results in input not working
|
||||
# mv $app/Contents/Info_Metal.plist $app/Contents/Info.plist
|
||||
|
||||
substituteInPlace $app/Contents/Info.plist \
|
||||
--replace '${"\${EXECUTABLE_NAME}"}' 'RetroArch' \
|
||||
--replace '$(PRODUCT_BUNDLE_IDENTIFIER)' 'com.libretro.RetroArch' \
|
||||
--replace '${"\${PRODUCT_NAME}"}' 'RetroArch' \
|
||||
--replace '${"\${MACOSX_DEPLOYMENT_TARGET}"}' '10.13'
|
||||
|
||||
cp media/retroarch.icns $app/Contents/Resources/
|
||||
'';
|
||||
|
||||
preFixup = "rm $out/bin/retroarch-cg2glsl";
|
||||
|
||||
# Workaround for the following error affecting newer versions of Clang:
|
||||
# ./config.def.h:xxx:x: error: 'TARGET_OS_TV' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_]
|
||||
NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isClang [ "-Wno-undef-prefix" ];
|
||||
|
||||
passthru.tests = nixosTests.retroarch;
|
||||
|
||||
meta = with lib; {
|
||||
@@ -168,8 +143,10 @@ stdenv.mkDerivation rec {
|
||||
changelog = "https://github.com/libretro/RetroArch/blob/v${version}/CHANGES.md";
|
||||
maintainers = with maintainers; teams.libretro.members ++ [ matthewbauer kolbycrouch ];
|
||||
mainProgram = "retroarch";
|
||||
# FIXME: error while building in macOS:
|
||||
# "Undefined symbols for architecture <arch>"
|
||||
# If you want to (re)-add support for macOS, see:
|
||||
# https://docs.libretro.com/development/retroarch/compilation/osx/
|
||||
# and
|
||||
# https://github.com/libretro/RetroArch/blob/71eb74d256cb4dc5b8b43991aec74980547c5069/.gitlab-ci.yml#L330
|
||||
broken = stdenv.isDarwin;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,11 +31,6 @@ symlinkJoin {
|
||||
rm $out/bin/retroarch
|
||||
makeWrapper ${retroarch}/bin/retroarch $out/bin/retroarch \
|
||||
${wrapperArgs}
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
# wrapProgram can't operate on symlinks
|
||||
rm $out/Applications/RetroArch.app/Contents/MacOS/retroarch
|
||||
makeWrapper ${retroarch}/bin/retroarch $out/Applications/RetroArch.app/Contents/MacOS/retroarch \
|
||||
${wrapperArgs}
|
||||
'';
|
||||
|
||||
meta = with retroarch.meta; {
|
||||
|
||||
@@ -1725,10 +1725,7 @@ with pkgs;
|
||||
|
||||
### APPLICATIONS/EMULATORS/RETROARCH
|
||||
|
||||
retroarchBare = callPackage ../applications/emulators/retroarch {
|
||||
inherit (darwin) libobjc;
|
||||
inherit (darwin.apple_sdk.frameworks) AppKit Foundation;
|
||||
};
|
||||
retroarchBare = callPackage ../applications/emulators/retroarch { };
|
||||
|
||||
retroarchFull = retroarch.override {
|
||||
cores = builtins.filter
|
||||
|
||||
Reference in New Issue
Block a user