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

qutebrowser: add wrapQtAppsHook #65895

Merged
merged 2 commits into from Aug 4, 2019

Conversation

emmanuelrosa
Copy link
Contributor

@emmanuelrosa emmanuelrosa commented Aug 4, 2019

This commit fixes the error:

Could not find the Qt platform plugin "xcb" in ""

and upgrades qutebrowser to 1.7.0

Closes #64984
Closes #65290
Closes #65150

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure wrapGAppsHook is needed here?

I'm assuming it was there before because it wraps XDG_DATA_DIRS, and wrapQtAppsHook does that so it should be unneeded.

@emmanuelrosa
Copy link
Contributor Author

With wrapGAppsHook, the wrapper looks like this:

#! /nix/store/xfghy8ixrhz3kyy6p724iv3cxji088dx-bash-4.4-p23/bin/bash -e
export GIO_EXTRA_MODULES='/nix/store/r78d406bbjbb6ziwqgyvxs8si25cadrq-glib-networking-2.60.3/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES
export XDG_DATA_DIRS='/nix/store/inlknqkinymvskvigpj345mfyfdvichx-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10:/nix/store/r3g9yn2cw6239szfq65q2cxw4cg35a81-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS
export XDG_DATA_DIRS='/nix/store/81k455cvnlfcf3an8zs4y41vwi0g2vyd-qutebrowser-1.6.3/share'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS
export GST_PLUGIN_SYSTEM_PATH_1_0='/nix/store/nr5hv7dklhgxd684lsqqbxf7sh7w4zf5-gstreamer-1.16.0/lib/gstreamer-1.0:/nix/store/ynkfgyhz7jghvy524y0xxypx2fn9pfy6-gst-plugins-base-1.16.0/lib/gstreamer-1.0:/nix/store/0d1x359zfyjc2j9snf9dym3avkxbqbnj-gst-plugins-good-1.16.0/lib/gstreamer-1.0:/nix/store/gl82wwf8jkjbln6ivdam760phdiang7f-gst-plugins-bad-1.16.0/lib/gstreamer-1.0:/nix/store/xg67dk9vwzsvdgd5ks20ikckic4j82lr-gst-plugins-ugly-1.16.0/lib/gstreamer-1.0:/nix/store/xmv4gcr8jljch61zca551f84dkmxkrci-gst-libav-1.16.0/lib/gstreamer-1.0'${GST_PLUGIN_SYSTEM_PATH_1_0:+':'}$GST_PLUGIN_SYSTEM_PATH_1_0
export QT_PLUGIN_PATH='/nix/store/qa3faa7dy41wxd1y2ldmg5fzc3pdwb10-qtbase-5.12.0-bin/lib/qt-5.12/plugins'${QT_PLUGIN_PATH:+':'}$QT_PLUGIN_PATH
export QT_PLUGIN_PATH='/nix/store/js4fqglx52l2gb8f1ad34r8b11xj3y5w-qtsvg-5.12.0-bin/lib/qt-5.12/plugins'${QT_PLUGIN_PATH:+':'}$QT_PLUGIN_PATH
export QT_PLUGIN_PATH='/nix/store/xvifggs4vc2czi95gir0gpvm45ysin3s-qtdeclarative-5.12.0-bin/lib/qt-5.12/plugins'${QT_PLUGIN_PATH:+':'}$QT_PLUGIN_PATH
export QML2_IMPORT_PATH='/nix/store/xvifggs4vc2czi95gir0gpvm45ysin3s-qtdeclarative-5.12.0-bin/lib/qt-5.12/qml'${QML2_IMPORT_PATH:+':'}$QML2_IMPORT_PATH
export QML2_IMPORT_PATH='/nix/store/319j582m94yaar88d6qk03rgm658l26f-qtquickcontrols-5.12.0/lib/qt-5.12/qml'${QML2_IMPORT_PATH:+':'}$QML2_IMPORT_PATH
export QT_PLUGIN_PATH='/nix/store/wn784aaax0q85l5inf71ayngs14sli61-qtwayland-5.12.0-bin/lib/qt-5.12/plugins'${QT_PLUGIN_PATH:+':'}$QT_PLUGIN_PATH
export QML2_IMPORT_PATH='/nix/store/wn784aaax0q85l5inf71ayngs14sli61-qtwayland-5.12.0-bin/lib/qt-5.12/qml'${QML2_IMPORT_PATH:+':'}$QML2_IMPORT_PATH
export XDG_DATA_DIRS='/nix/store/81k455cvnlfcf3an8zs4y41vwi0g2vyd-qutebrowser-1.6.3/share'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS
exec -a "$0" "/nix/store/81k455cvnlfcf3an8zs4y41vwi0g2vyd-qutebrowser-1.6.3/bin/.qutebrowser-wrapped_"  "${extraFlagsArray[@]}" "$@"

Without wrapGAppsHook, the wrapper looks like this:

#! /nix/store/xfghy8ixrhz3kyy6p724iv3cxji088dx-bash-4.4-p23/bin/bash -e
export QT_PLUGIN_PATH='/nix/store/qa3faa7dy41wxd1y2ldmg5fzc3pdwb10-qtbase-5.12.0-bin/lib/qt-5.12/plugins'${QT_PLUGIN_PATH:+':'}$QT_PLUGIN_PATH
export QT_PLUGIN_PATH='/nix/store/js4fqglx52l2gb8f1ad34r8b11xj3y5w-qtsvg-5.12.0-bin/lib/qt-5.12/plugins'${QT_PLUGIN_PATH:+':'}$QT_PLUGIN_PATH
export QT_PLUGIN_PATH='/nix/store/xvifggs4vc2czi95gir0gpvm45ysin3s-qtdeclarative-5.12.0-bin/lib/qt-5.12/plugins'${QT_PLUGIN_PATH:+':'}$QT_PLUGIN_PATH
export QML2_IMPORT_PATH='/nix/store/xvifggs4vc2czi95gir0gpvm45ysin3s-qtdeclarative-5.12.0-bin/lib/qt-5.12/qml'${QML2_IMPORT_PATH:+':'}$QML2_IMPORT_PATH
export QML2_IMPORT_PATH='/nix/store/319j582m94yaar88d6qk03rgm658l26f-qtquickcontrols-5.12.0/lib/qt-5.12/qml'${QML2_IMPORT_PATH:+':'}$QML2_IMPORT_PATH
export QT_PLUGIN_PATH='/nix/store/wn784aaax0q85l5inf71ayngs14sli61-qtwayland-5.12.0-bin/lib/qt-5.12/plugins'${QT_PLUGIN_PATH:+':'}$QT_PLUGIN_PATH
export QML2_IMPORT_PATH='/nix/store/wn784aaax0q85l5inf71ayngs14sli61-qtwayland-5.12.0-bin/lib/qt-5.12/qml'${QML2_IMPORT_PATH:+':'}$QML2_IMPORT_PATH
export XDG_DATA_DIRS='/nix/store/i7kqq9zfrw6bvm02gq5xp1vpkj76b858-qutebrowser-1.6.3/share'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS
exec -a "$0" "/nix/store/i7kqq9zfrw6bvm02gq5xp1vpkj76b858-qutebrowser-1.6.3/bin/.qutebrowser-wrapped_"  "${extraFlagsArray[@]}" "$@"

A brief smoke-test didn't reveal any issues at runtime, but I want to test it further before committing to removing wrapGAppsHook.

@worldofpeace
Copy link
Contributor

Ah, it would be needed for glib-networking and gstreamer which I didn't check.

@worldofpeace
Copy link
Contributor

Think this should be good, do you want to combine this with a change like #65150 @emmanuelrosa ?

@emmanuelrosa
Copy link
Contributor Author

Yes, @worldofpeace

I'll go ahead and apply the qutebrowser-1.7.0 commit

Emmanuel Rosa and others added 2 commits August 4, 2019 17:40
This commit fixes the error:

Could not find the Qt platform plugin "xcb" in ""

Closes NixOS#65895
pdfjs: 1.10.100 -> 2.1.266
Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runs for me in NixOS in a non-qt environment.

@worldofpeace worldofpeace merged commit 48d832d into NixOS:master Aug 4, 2019
@emmanuelrosa emmanuelrosa deleted the qutebrowser-qt-fix branch August 5, 2019 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants