3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/virtualization/virtualbox/qt-env-vars.patch
Ambroz Bizjak b52dfd3007 virtualbox: Make sure that Qt finds plugins to make VMs run again.
Fixes #65564. When hardening is enabled, we cannot use a wrapper for
VirtualBoxVM, so patch the source code to set QT_PLUGIN_PATH as required.
2019-09-04 06:38:12 -07:00

15 lines
418 B
Diff

--- a/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp
+++ b/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp
@@ -2131,6 +2131,11 @@ static void supR3HardenedMainPurgeEnvironment(char **envp)
/** @todo Call NT API to do the same. */
#endif
}
+
+ /*
+ * NixOS hack: Set QT_PLUGIN_PATH to make Qt find plugins.
+ */
+ setenv("QT_PLUGIN_PATH", "@qtPluginPath@", /*overwrite=*/ 1);
}