Change:
Packaged VLC does not seem to support wayland. Steps to reproduce the behavior: vlc with on e.g. sway opens as a XWayland window VLC opens as a Wayland native window Not applicable Possibly related to VLC not depending on qtwayland. Please run and paste the result. EDIT: Typo
It is strange. I built it and verified, it is not linked with QT libraries even if they are put as inputs.
Is also pulled in as an input?
Nope. Working on it now. First encounter: Wayland is considered experimental and disabled by default.
Can you test the patch?
Works like a charm, thanks a lot! :)
I'm on NixOS 23.05 and discovered that vlc prefers to use XWayland if var is set. If I unset then vlc starts in Wayland mode. Does anyone know how to make it to start on Wayland by default?
For now I hacked it with: Special thanks to
Well, if this is hardcoded on VLC, there is nothing to do (besides maybe searching some hidden commandline flag).
The "use QTQPAPLATFORM be damned" behavior is apparently just what QT does, and is not specific to VLC
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
Here is the updated wrap that also addresses the desktop file

Discussion:
, systemd , taglib , unzip <del> , wayland , wayland-protocols </del> , xorg , zlib , chromecastSupport ? true, libmicrodns, protobuf , jackSupport ? false , onlyLibVLC ? false , skins2Support ? !onlyLibVLC, freetype <del> , withQt5 ? true, qtbase, qtsvg, qtx11extras, wrapQtAppsHook </del> <ins> , waylandSupport ? true, wayland, wayland-protocols , withQt5 ? true, qtbase, qtsvg, qtwayland, qtx11extras, wrapQtAppsHook </ins> }: # chromecastSupport requires TCP port 8010 to be open for it to work.

srt systemd taglib <del> wayland wayland-protocols </del> zlib ] ++ (with xorg; [

++ optional (!hostIsAarch) live555 ++ optional jackSupport libjack2 ++ optionals chromecastSupport [ libmicrodns protobuf ] <del> ++ optionals skins2Support (with xorg; [ freetype libXext libXinerama libXpm ]) ++ optionals withQt5 [ qtbase qtsvg qtx11extras ]; </del> <ins> ++ optionals skins2Support (with xorg; [ freetype libXext libXinerama libXpm ]) ++ optionals waylandSupport [ wayland wayland-protocols ] ++ optionals withQt5 [ qtbase qtsvg qtx11extras ] ++ optional (waylandSupport && withQt5) qtwayland; </ins> nativeBuildInputs = [ autoreconfHook

removeReferencesTo unzip ] <del> ++ optionals withQt5 [ wrapQtAppsHook ]; </del> <ins> ++ optionals withQt5 [ wrapQtAppsHook ] ++ optionals waylandSupport [ wayland wayland-protocols ]; </ins> enableParallelBuilding = true;

configureFlags = [ "--enable-srt" # Explicit enable srt to ensure the patch is applied. "--with-kde-solid=$out/share/apps/solid/actions" <del> ] ++ optional onlyLibVLC "--disable-vlc" ++ optional skins2Support "--enable-skins2" ++ optionals chromecastSupport [ </del> <ins> ] ++ optional onlyLibVLC "--disable-vlc" ++ optional skins2Support "--enable-skins2" ++ optional waylandSupport "--enable-wayland" ++ optionals chromecastSupport [ </ins> "--enable-sout" "--enable-chromecast" "--enable-microdns"

libcaca = null; }; <del> vlc_qt5 = vlc; </del> libvlc = vlc.override { withQt5 = false; qtbase = null;