-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
wireshark: export QT_PLUGIN_PATH in shellHook #42864
Conversation
...else program fails with: This application failed to start because it could not find or load the Qt platform plugin "xcb" in "".
Success on x86_64-linux (full log) Attempted: wireshark Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: wireshark Partial log (click to expand)
|
This issue is not specific to Wireshark, it is common to all Qt packages: you need |
Ok this appears to be related to my issue: #42893 I didn't realize that qt apps needed qtbase installed. Can we provide a fallback path in these cases? IMO relying on propagatedUserEnvPkgs to do the right thing is harmful because not everyone will install your app through the traditional |
@orivej what if qtbase/wireshark is not installed ? Installed wireshark works without any problem but I am doing some development on it, thus I would like build/run/wireshark to work without having to specify manually in nix-shell the correct paths. |
@teto You only have to make sure that |
@@ -91,6 +91,7 @@ in stdenv.mkDerivation { | |||
shellHook = '' | |||
# to be able to run the resulting binary | |||
export WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1 | |||
export QT_PLUGIN_PATH=${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix} |
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.
If we wanted to add this, it should probably be conditional on withQt
.
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.
I think a makeWrapper call adding QT_PLUGIN_PATH around $out/bin/wireshark
makes more sense here.
@matthewbauer it is already wrapped. I am specifically targeting the developing phase when you are in your |
Ok that seems like something we can do in the qt hook becuase it should apply to all qt based packages. |
seems like more holistic solutions are coming up. closing |
...else program fails with:
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Motivation for this change
I am fixing a bug in wireshark within a nix-shell and could not start the dev wireshark due to this error.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)