Skip to content

Commit 2ce7985

Browse files
committed
Unset QT_PLUGIN_PATH. This avoids Qt version mismatches when QT_PLUGIN_PATH is set on the host. This is often the case on NixOS.
1 parent d15373b commit 2ce7985

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/deployment.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,12 @@ inline bool createAppRunHook(appdir::AppDir &appDir) {
110110
<< " *GNOME*|*gnome*|*XFCE*)" << std::endl
111111
<< " export QT_QPA_PLATFORMTHEME=" << (haveGtk3 ? "gtk3" : "gtk2") << std::endl
112112
<< " ;;" << std::endl
113-
<< "esac" << std::endl;
113+
<< "esac" << std::endl
114+
<< std::endl
115+
<< "# Override QT_PLUGIN_PATH to fall back to defaults. NixOS sets QT_PLUGIN_PATH," << std::endl
116+
<< "# which causes AppImages with Qt to try and load system Qt plugins." << std::endl
117+
<< "# This usually fails due to the mismatched Qt versions." << std::endl
118+
<< "unset QT_PLUGIN_PATH" << std::endl;
114119

115120
return true;
116121
}

0 commit comments

Comments
 (0)