-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
vivaldi: allow selecting qt5 or 6 and gtk3 or 4 #292148
Conversation
I don't think so, please try using |
It definitely does not work on my box without that override
I gather we intentionally avoid the wrapper here? https://github.com/NixOS/nixpkgs/pull/222718/files#r1147390358 |
I mean the override is just a hack instead of a proper solution.
But why, if it depends on qt, it is a qt application. The wrapper provides the correct QT_PLUGIN_PATH for the wayland backend (or other qt plugins) to be found. |
Ah, that makes sense. I must say I am out of my depth here, so let cc @spacefrogg here :-) |
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.
Hi, I'm author of below pull requests that started the conversation, and appereciate your awesome suggestion!!
However, there is a slight deviation from the original intent, which I would be happy if you consider.
Original problem which I thought is that vivaldi is not working on gtk4 even though it has --gtk-version=4
as a option.
Vivaldi cannot found gtk4 manually installed by user, the only way is to include gtk4 as a dependency on the nixpkgs side.
I think we have two options:
-
So, If we decide that the Nixpkgs side specify which gtk to use...
I believe that--gtk-version-4
should be automatically added to default flags. if gtk4 selected. -
Or as it has always been, If we decide that the User side specify which gtk to use by flags...
What we should have is like...enableGtk3 ? true enableGtk4 ? false enableQt5 ? true enableQt6 ? false
or,
gtk ? [gtk3] qt ? [qt5]
In short, the should be able to include multiple package because users may use
--gtk-version=3
, or they may use--gtk-version-4
.
Personally, I think the latter is better, but I am not sure....
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.
Thanks! Please see other comments.
@@ -113,7 +115,7 @@ in stdenv.mkDerivation rec { | |||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ |
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.
Also add the following to accommodate gtk4 support
--add-flags --gtk-version=${lib.versions.major gtk.version}
, gtk ? gtk3 | ||
, qt ? qt5 |
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.
Document, how they are supposed to be used,
Just upgraded to KDE 6, got a broken vivaldi and finally managed to bring it up using What's the suggested local fix before this gets merged (if it eventually will be)? And btw, shouldn't we land a fix asap, even if it's hacky, so that users won't face a broken browser after updating? (At least that what my understanding of distribution packaging's job...) |
After upgrade to plasma 6, it still can't start direct from start menu, but it can start in terminal |
Thank you for providing this workaround! I held off upgrading to Plasma 6 just because of this regression! I realize there are too many packages to test, but browsers are some of the core and highly personalized software that people can't function without. |
I'm glad you find it helpful! And yes, really, it's frustrating when a browser is completely broken, and even more so when a fix PR remains inactive for a week. |
b4f77fb
to
02fc611
Compare
@spacefrogg PTAL:
Still not sure whether we should go with the whole "wrapQtApp" thing. But I think this is already an improvements, and I personally would rather stop here, as I don't want to do a larger refactor here. |
The PR was blocked on me doing the requested changes. In this situation, it might be better to submit a counter-PR which is better and can be merged as is (provided that you understand what maintainers want, and can actually send a PR which can be merged without requiring further review). |
As I understand it, vivaldi is neither a qt nor a GTK application. It supports both libraries to blend-in with respective window managers. I suppose, that is what the qt5 and qt6 shims are there for. Thus, I would refrain from using any qt- or GTK-specific wrapper until this cannot be avoided. It would likely mean splitting the package into definite qt- and GTK-enabled versions which the user would have to be consciously picking. |
Not sure if I am doing something wrong, but vivalid still fails. ~❯ nix run github:nixos/nixpkgs#vivaldi --impure via 🐍 v3.11.8 (.venv) via ❄ impure (sfconn-env)
Gtk-Message: 10:00:18.502: Failed to load module "appmenu-gtk-module"
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.
[0324/100018.525458:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0324/100018.525534:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0324/100018.525806:ERROR:process_memory_range.cc(75)] read out of range I am sure if override |
No magic. So, it looks like we need four packages, then: |
I'd rather leave that for someone else to do in a follow up: that will change the "public interface" of things, and I am not qualified enough to do that kind of change (and not motivated enough at this time to become qualified :) ) |
02fc611
to
b5c0c85
Compare
Status: my understanding is that this is waiting for review to either get merged, or get closed as an incorrect approach. |
b5c0c85
to
fc8cb2b
Compare
fc8cb2b
to
b15fbc6
Compare
a785001
to
fb12be9
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/3891 |
fb12be9
to
871020c
Compare
I confirm that for Plasma 6 the following does the trick : cus_vivaldi = pkgs.vivaldi.overrideAttrs (oldAttrs: {
dontWrapQtApps = false;
dontPatchELF = true;
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ pkgs.kdePackages.wrapQtAppsHook ];
}); |
works finally |
for me this now lets me start it from terminal again, but the taskbar icon just does nothing after some short loading. vivaldi.override { commandLineArgs = "--disable-features=AllowQt"; }; for quite some time but after the last update it just stopped working. using the wrapQtAppsHook i can at least open it in the terminal now, but i cant figure out what is still wrong with the icon alone edit: something i just found out is that if I attempt to run the pkg that is referenced in the .desktop file it does not work, but if i add a command line parameter it does start up ❯ /nix/store/i5324pwbijs0r0prh4x2ds4yrkv5w8vk-vivaldi-6.8.3381.46/bin/vivaldi
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.
Available platform plugins are: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx.
[0704/232857.071733:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0704/232857.071986:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0704/232857.073038:ERROR:process_memory_range.cc(75)] read out of range
fish: Job 1, '/nix/store/i5324pwbijs0r0prh4x2…' terminated by signal SIGABRT (Abort)
❯ /nix/store/i5324pwbijs0r0prh4x2ds4yrkv5w8vk-vivaldi-6.8.3381.46/bin/vivaldi --ozone-platform=wayland
libEGL warning: egl: failed to create dri2 screen
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
libEGL warning: egl: failed to create dri2 screen
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
[221184:221184:0704/232905.987894:ERROR:viz_main_impl.cc(166)] Exiting GPU process due to errors during initialization
libEGL warning: egl: failed to create dri2 screen
DRM kernel driver 'nvidia-drm' in use. NVK requires nouv my current overlay looks like this: final: prev: {
vivaldi = (prev.vivaldi.overrideAttrs (oldAttrs: {
dontWrapQtApps = false;
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [
channels.unstable.kdePackages.wrapQtAppsHook ];
})).override {
commandLineArgs = ''
-enable-features=UseOzonePlatform
--ozone-platform=wayland
--ozone-platform-hint=auto
--enable-features=WaylandWindowDecorations
'';
};
} |
After some more testing, there are multiple versions in the nix store (due to me recompiling multiple times), that run out of the box, but the one linked in my .desktop file never does, anyone has some idea how i can properly update the desktop item, since the vivaldi package does not seem to use the makeDesktopIcon and it seems a bit backwards to reimplement the whole Install phase thing |
@Daholli somehow your options don't work for me
Installed vivaldi with
(New to nixos, it could be me doing stupid things) |
You might also need the package qt5.qtwayland |
I was able to get Vivaldi running on Plasma 6 by installing the package |
While I could get Vivaldi to run with adding
- both of those setups produced a mix of blank Vivaldi windows and/or blank/non-rendering tabs. What finally worked for me, was using the same change as is in this PR, which still works on the current version in nixpkgs unstable: (pkgs.vivaldi.overrideAttrs (oldAttrs: {
buildPhase = builtins.replaceStrings
["for f in libGLESv2.so libqt5_shim.so ; do"]
["for f in libGLESv2.so libqt5_shim.so libqt6_shim.so ; do"]
oldAttrs.buildPhase
;
})).override {
qt5 = pkgs.qt6;
commandLineArgs = [ "--ozone-platform=wayland" ];
# The following two are just my preference, feel free to leave them out
proprietaryCodecs = true;
enableWidevine = true;
}; I'm running Plasma 6 on Wayland, so that might have something to do with my issues with qt5. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/new-install-vivaldi-not-starting/53282/1 |
Description of changes
Make vivaldi's qt and gtk versions overridable. qt5 and gtk3 are still used by default, but the user now have the option of
vivaldi.override { qt = qt6; }
Notably, overriding qt to version 6 is required to make vivaldi work with plasma 6:
#286522 (comment)
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.