mkvtoolnix: fix GUI on darwin (#133848)

The MKVToolNix GUI has been marked as unsupported on darwin since
88d7718a64 (mkvtoolnix-cli: fix build on darwin, 2017-03-13), but
currently it builds without issues. It is when mkvtoolnix-gui is run
that the window doesn't appear.

Setting the environment variable QT_MAC_WANTS_LAYER=1 fixes it and now
the GUI runs on Darwin too.

Tested on Big Sur.

Picked from 461466306e (octaveFull: set QT_MAC_WANTS_LAYER=1 on Darwin,
2021-07-22).
This commit is contained in:
Sebastián Mancilla 2021-08-15 22:40:11 -04:00 committed by GitHub
parent 21a6e4fa9e
commit a299818b79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,6 +122,11 @@ 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
'';
@ -131,7 +136,6 @@ stdenv.mkDerivation rec {
homepage = "https://mkvtoolnix.download/";
license = licenses.gpl2Only;
maintainers = with maintainers; [ codyopel rnhmjoj ];
platforms = platforms.linux
++ optionals (!withGUI) platforms.darwin;
platforms = platforms.unix;
};
}