New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
virtualbox: Fix #65564 #67968
virtualbox: Fix #65564 #67968
Conversation
@ambrop72 nice, thanks a lot for this! I gave this a test run, and could get the virtualbox tests to work. However, some assertion inside
I was lazy, commented-out the assertion, and the tests did pass 🎉 I'm not sure why this resurfaced now. What about that line here in
is this fixed by now? Can we move to a more recent kernel? |
Also CC @ttuegel on |
+ | ||
+ /* | ||
+ * NixOS hack: Set QT_PLUGIN_PATH to make Qt find plugins. The placeholder | ||
+ * on the right will be replaced with the correct value by the builder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use substituteAll
instead of the manual sed
? Many examples of how we use this in gtk packaging fix-paths.patch
s
+ * NixOS hack: Set QT_PLUGIN_PATH to make Qt find plugins. The placeholder | ||
+ * on the right will be replaced with the correct value by the builder. | ||
+ */ | ||
+ setenv("QT_PLUGIN_PATH", "<QT_PLUGIN_PATH>", /*overwrite=*/ 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prepare for this to be a reference point for when anyone else bumps into an issue like this 😄
(and suddenly there's 15 more patches like it)
@@ -37,7 +37,7 @@ in stdenv.mkDerivation { | |||
nativeBuildInputs = [ pkgconfig which docbook_xsl docbook_xml_dtd_43 patchelfUnstable ] | |||
++ optional (!headless) wrapQtAppsHook; | |||
|
|||
# Wrap manually because we just need to wrap one executable | |||
# Wrap manually because we just need to wrap one or two executables. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Wrap manually because we just need to wrap one or two executables. | |
# Wrap manually because we have limit which executables are wrapped. |
7c35197
to
61e362e
Compare
Fixes NixOS#65564. When hardening is enabled, we cannot use a wrapper for VirtualBoxVM, so patch the source code to set QT_PLUGIN_PATH as required.
61e362e
to
b52dfd3
Compare
Thanks a lot! |
When hardening is enabled, we cannot use a wrapper for VirtualBoxVM, so patch
the source code to set QT_PLUGIN_PATH as required.
Motivation for this change
Things done
Tested that virtual machines run via the GUI on nixos-unstable both with and without hardening.
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @flokli @svanderburg