Merge pull request #145473 from talyz/qt512-big-sur-fix

qt512: Make apps work on macOS Big Sur
This commit is contained in:
Kim Lindberger 2021-11-15 19:46:52 +01:00 committed by GitHub
commit 855a211fd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 10 deletions

View file

@ -122,11 +122,6 @@ stdenv.mkDerivation rec {
dontWrapQtApps = true;
# Avoid Qt 5.12 problem on Big Sur: https://bugreports.qt.io/browse/QTBUG-87014
qtWrapperArgs = lib.optionals stdenv.isDarwin [
"--set QT_MAC_WANTS_LAYER 1"
];
postFixup = optionalString withGUI ''
wrapQtApp $out/bin/mkvtoolnix-gui
'';

View file

@ -187,11 +187,6 @@ let
# Fix linker error on Darwin (see https://trac.macports.org/ticket/61865)
NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-lobjc";
# Avoid Qt 5.12 problem on Big Sur: https://bugreports.qt.io/browse/QTBUG-87014
qtWrapperArgs = lib.optionals stdenv.isDarwin [
"--set QT_MAC_WANTS_LAYER 1"
];
# See https://savannah.gnu.org/bugs/?50339
F77_INTEGER_8_FLAG = if use64BitIdx then "-fdefault-integer-8" else "";

View file

@ -70,6 +70,17 @@ let
# Ensure -I${includedir} is added to Cflags in pkg-config files.
# See https://github.com/NixOS/nixpkgs/issues/52457
./qtbase.patch.d/0014-qtbase-pkg-config.patch
# Make Qt applications work on macOS Big Sur even if they're
# built with an older version of the macOS SDK (<10.14). This
# issue is fixed in 5.12.11, but it requires macOS SDK 10.13 to
# build. See https://bugreports.qt.io/browse/QTBUG-87014 for
# more info.
(fetchpatch {
name = "big_sur_layer_backed_views.patch";
url = "https://codereview.qt-project.org/gitweb?p=qt/qtbase.git;a=patch;h=c5d904639dbd690a36306e2b455610029704d821";
sha256 = "0crkw3j1iwdc1pbf5dhar0b4q3h5gs2q1sika8m12y02yk3ns697";
})
];
qtdeclarative = [ ./qtdeclarative.patch ];
qtlocation = [ ./qtlocation-gcc-9.patch ];