Skip to content
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

pyqt cannot load plugins #283

Open
kirelagin opened this issue Apr 8, 2021 · 0 comments
Open

pyqt cannot load plugins #283

kirelagin opened this issue Apr 8, 2021 · 0 comments

Comments

@kirelagin
Copy link
Contributor

This repository has a test that pyqt5 builds, but it does not test that it actually works. In reality, even a “hello world”, i.e. trying to show an empty window, fails with:

qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

This is probably somehow related to NixOS/nixpkgs#65399 and the solution is to set $QT_PLUGIN_PATH correctly. I did this by adding:

{
  postInstall = ''
    for i in "$out"/bin/*; do
      wrapProgram "$i" --prefix QT_PLUGIN_PATH : "${pkgs.qt5.qtbase}/${pkgs.qt5.qtbase.qtPluginPrefix}"
    done
  '';
}

Ideally, we’d want to make this happen automatically, and also somehow reuse wrapQtAppsHook. The problem with this hook is that it is too smart and it only wraps ELF binaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant