Merge pull request #98970 from veprbl/pr/stellarium_darwin_fix

stellarium: enable on darwin
This commit is contained in:
Maximilian Bosch 2020-09-30 20:11:34 +02:00 committed by GitHub
commit 9b2476fcca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ mkDerivation, lib, fetchFromGitHub
{ stdenv, lib, mkDerivation, fetchFromGitHub
, cmake, freetype, libpng, libGLU, libGL, openssl, perl, libiconv
, qtscript, qtserialport, qttools
, qtmultimedia, qtlocation, qtbase, wrapQtAppsHook
@ -22,12 +22,21 @@ mkDerivation rec {
qtmultimedia qtlocation qtbase
];
preConfigure = lib.optionalString stdenv.isDarwin ''
substituteInPlace CMakeLists.txt \
--replace 'SET(CMAKE_INSTALL_PREFIX "''${PROJECT_BINARY_DIR}/Stellarium.app/Contents")' \
'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Stellarium.app/Contents")'
'';
postFixup = lib.optionalString stdenv.isDarwin ''
wrapQtApp "$out"/Stellarium.app/Contents/MacOS/stellarium
'';
meta = with lib; {
description = "Free open-source planetarium";
homepage = "http://stellarium.org/";
license = licenses.gpl2;
platforms = platforms.linux; # should be mesaPlatforms, but we don't have qt on darwin
platforms = platforms.unix;
maintainers = with maintainers; [ peti ma27 ];
};
}