flightgear: darwin support
This commit is contained in:
@@ -78,7 +78,10 @@ stdenv.mkDerivation {
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_OSG_APPLICATIONS=OFF" ];
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_OSG_APPLICATIONS" false)
|
||||
]
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin (lib.cmakeFeature "OSG_WINDOWING_SYSTEM" "Cocoa");
|
||||
|
||||
meta = {
|
||||
description = "3D graphics toolkit";
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
libxmu,
|
||||
libxt,
|
||||
simgear,
|
||||
xz,
|
||||
zlib,
|
||||
boost,
|
||||
cmake,
|
||||
@@ -72,15 +73,29 @@ stdenv.mkDerivation rec {
|
||||
qt5.wrapQtAppsHook
|
||||
];
|
||||
buildInputs = [
|
||||
libglut
|
||||
freealut
|
||||
libjpeg
|
||||
openal
|
||||
plib
|
||||
(simgear.override { openscenegraph = openscenegraph; })
|
||||
zlib
|
||||
boost
|
||||
libpng
|
||||
fltk_1_3
|
||||
apr
|
||||
qt5.qtbase
|
||||
qt5.qtquickcontrols2
|
||||
glew
|
||||
qt5.qtdeclarative
|
||||
curl
|
||||
openscenegraph
|
||||
xz
|
||||
]
|
||||
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
||||
libglut
|
||||
libGLU
|
||||
libGL
|
||||
libice
|
||||
libjpeg
|
||||
openal
|
||||
openscenegraph
|
||||
plib
|
||||
libsm
|
||||
libunwind
|
||||
libx11
|
||||
@@ -89,25 +104,27 @@ stdenv.mkDerivation rec {
|
||||
libxi
|
||||
libxmu
|
||||
libxt
|
||||
(simgear.override { openscenegraph = openscenegraph; })
|
||||
zlib
|
||||
boost
|
||||
libpng
|
||||
udev
|
||||
fltk_1_3
|
||||
apr
|
||||
qt5.qtbase
|
||||
qt5.qtquickcontrols2
|
||||
glew
|
||||
qt5.qtdeclarative
|
||||
curl
|
||||
];
|
||||
|
||||
cmakeFlags = lib.optional stdenv.hostPlatform.isDarwin (
|
||||
lib.cmakeFeature "CMAKE_OSX_DEPLOYMENT_TARGET" "11.0"
|
||||
);
|
||||
|
||||
qtWrapperArgs = [ "--set FG_ROOT ${data}/share/FlightGear" ];
|
||||
|
||||
postInstall = ''
|
||||
# Remove redundant AppImage artifacts
|
||||
rm -rf "$out/appdir"
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# The bundle copies OSG dylib dangling symlinks
|
||||
rm -rf "$out/FlightGear.app/Contents/Frameworks"
|
||||
# Place app bundle where macOS expects it
|
||||
mkdir -p "$out/Applications"
|
||||
mv "$out/FlightGear.app" "$out/Applications/"
|
||||
# Provide fgfs in bin/ for CLI use, pointing into the bundle
|
||||
ln -s "$out/Applications/FlightGear.app/Contents/MacOS/FlightGear" "$out/bin/fgfs"
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
@@ -118,7 +135,7 @@ stdenv.mkDerivation rec {
|
||||
raskin
|
||||
kirillrdy
|
||||
];
|
||||
platforms = lib.platforms.linux;
|
||||
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||||
hydraPlatforms = [ ]; # disabled from hydra because it's so big
|
||||
license = lib.licenses.gpl2Plus;
|
||||
mainProgram = "fgfs";
|
||||
|
||||
Reference in New Issue
Block a user