retroarch: remove macOS app support

This is badly out of date so requires extra work to get working.

Anyway, you can still use it without the menu, with no problem.
This commit is contained in:
Matthew Bauer 2020-03-21 23:36:54 -04:00
parent 293b16aae9
commit a8a0cb147f

View file

@ -19,15 +19,7 @@
with stdenv.lib;
let
# ibtool is closed source so we have to download the blob
osx-MainMenu = fetchurl {
url = "https://github.com/matthewbauer/RetroArch/raw/b146a9ac6b2b516652a7bf05a9db5a804eab323d/pkg/apple/OSX/en.lproj/MainMenu.nib";
sha256 = "13k1l628wy0rp6wxrpwr4g1m9c997d0q8ks50f8zhmh40l5j2sp8";
};
in stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
pname = "retroarch-bare";
version = "1.8.5";
@ -54,29 +46,6 @@ in stdenv.mkDerivation rec {
postInstall = optionalString withVulkan ''
wrapProgram $out/bin/retroarch --prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib
'' + optionalString stdenv.targetPlatform.isDarwin ''
EXECUTABLE_NAME=RetroArch
PRODUCT_NAME=RetroArch
MACOSX_DEPLOYMENT_TARGET=10.5
app=$out/Applications/$PRODUCT_NAME.app
install -D pkg/apple/OSX/Info.plist $app/Contents/Info.plist
echo "APPL????" > $app/Contents/PkgInfo
mkdir -p $app/Contents/MacOS
ln -s $out/bin/retroarch $app/Contents/MacOS/$EXECUTABLE_NAME
# Hack to fill in Info.plist template w/o using xcode
sed -i -e 's,''${EXECUTABLE_NAME}'",$EXECUTABLE_NAME," \
-e 's,''${MACOSX_DEPLOYMENT_TARGET}'",$MACOSX_DEPLOYMENT_TARGET," \
-e 's,''${PRODUCT_NAME}'",$PRODUCT_NAME," \
-e 's,''${PRODUCT_NAME:rfc1034identifier}'",$PRODUCT_NAME," \
$app/Contents/Info.plist
install -D ${osx-MainMenu} \
$app/Contents/Resources/en.lproj/MainMenu.nib
install -D pkg/apple/OSX/en.lproj/InfoPlist.strings \
$app/Contents/Resources/en.lproj/InfoPlist.strings
install -D media/retroarch.icns $app/Contents/Resources/retroarch.icns
'';
preFixup = "rm $out/bin/retroarch-cg2glsl";