From a299818b7922e6403034b1bb9a388c0dbe238917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= <238528+smancill@users.noreply.github.com> Date: Sun, 15 Aug 2021 22:40:11 -0400 Subject: [PATCH] mkvtoolnix: fix GUI on darwin (#133848) The MKVToolNix GUI has been marked as unsupported on darwin since 88d7718a64d (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 461466306ef (octaveFull: set QT_MAC_WANTS_LAYER=1 on Darwin, 2021-07-22). --- pkgs/applications/video/mkvtoolnix/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/mkvtoolnix/default.nix b/pkgs/applications/video/mkvtoolnix/default.nix index 7cffcd923ff7..0f271dd889e8 100644 --- a/pkgs/applications/video/mkvtoolnix/default.nix +++ b/pkgs/applications/video/mkvtoolnix/default.nix @@ -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; }; }