-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
kdePackages: add qtwayland to ensure wayland platform support #341028
Conversation
I'd rather have it in wrapQtAppsHook, as previously discussed. |
Why is propagation the wrong approach here? |
I don't follow. Propagated inputs follow the same offsets as normal, so they should not be causing issues on cross. Even if they are, the hook could simply add qtwayland to QT_PLUGIN_PATH without propagating it. |
My understanding is that there's some black magic inside Qt toolkit that no one has enough patience and time to figure it out and workaround it correctly |
Qt cross is currently broken, but I don't think propagating qtwayland would make it any more broken. |
We're taking a step backwards with propagation, why should we actively make cross worse? |
You're still assuming propagation makes cross worse. It doesn't. |
How is picking the wrong arch's setup hook better for cross? Please explain that. |
But it's not efficient to always tell people "hey you should include qtwayland now" and adding qtwayland to plugin paths will bring incompatibility between Qt versions. We just end up with a very broken user experience with nearly all Qt6 programs now, not only kde6 ones |
How would this be picking the wrong setup hook? |
If I knew the answer to "why"/"how", I'd simply fix it and we wouldn't be having this discussion. After searching around a bit, it seems that someone else has observed this as well (#269756 (comment)) and they've tried to fix in qt5 here: #267311 |
This is Qt5, which is an entirely different build system, with an entirely different set of problems. |
Well according to https://doc.qt.io/qt-6/qmake-environment-reference.html hardcoding QMAKE_XSPEC is still a thing, it looks pretty identical to the qt5 page so I'm not sure why you say it's an entirely different system |
Because Qt6 builds with CMake, not qmake. |
Okay, please feel free to create a PR that better reflects the Qt maintainer intentions then. I'd be happy to take a look and learn. |
qtwayland isn't the only plugin useful for a wide range of apps. For instance, kimageformats is such. And there are likely many others. IMO, the right way would be to have Qt plugins configurable via a NixOS module, to have global set of plugins for any application, just like Qt expects it to be. Also, #333012 doesn't look like a real bug: Qt is supposed to fallback to xcb. What happened perhaps is that the user sets |
@K900 aren't we already doing this with KDE (indirectly via |
We are already doing that for everything, really, you can just |
Maybe the point is to make it more discoverable, e.g. have some |
We could add options like that pretty easily, if there's interest. |
Do we even need an option? Just add it by default here nixpkgs/nixos/modules/config/qt.nix Line 150 in 1355a0c
|
Actually, now that I think about it, one issue with this approach is that we end up breaking applications with mismatched Qt versions. |
Qt 5 and Qt 6 have a different NIXPKGS_QT_PLUGIN_PREFIX. In fact this makes adding plugins to systemPackages safer than setting QT_PLUGIN_PATH. |
I don't mean a different major Qt version, I mean different minor Qt versions. |
Then you can just add full version to the prefix? |
But how would we provide plugins for older Qt versions? |
The point is to prevent reports from people who don't know how Qt works (that they need a package in first place) and using a non-Qt DE/WM. A |
The same way older Qt packages are provided? Not loading plugins of other version is a better UX than a crash IMO. |
There is no crash, Qt will ignore mismatched plugins. The question is that maybe we want at least qtwayland by default, so applications from other nixpkgs don't just break on Wayland-only. |
This is actually upstream question, IMO. One has to install qtwayland manually on any user-centric distro (such as Arch or Debian). QT_QPA_DEFAULT_PLATFORM is still xcb and changing it to wayland would likely require moving the platform plugin into qtbase so maybe it's worth to ask about changing QT_QPA_DEFAULT_PLATFORM upstream? |
Description of changes
Fixes #305959, couldn't find any other similar issues for some reason
Tested this with
kdePackages.kruler
, it now starts withQT_QPA_PLATFORM=wayland
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.