ladybird/Ladybird/ladybird.nix
Linus Groh 533f2a4980 Ladybird: Add qtwayland to QT_PLUGIN_PATH in nix-shell script
Otherwise Qt would not find the wayland plugin it is instructed to use
via QT_QPA_PLATFORM, and would fall back to the second option, xcb,
which looks rather sad in a modern Wayland environment :^)

This feels like something that should be addressed upstream in nixpkgs
eventually.
2023-02-19 00:37:51 +01:00

27 lines
581 B
Nix

{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell.override
{
stdenv = pkgs.gcc12Stdenv;
}
{
name = "ladybird";
nativeBuildInputs = with pkgs; [
pkgconfig
cmake
ninja
libxcrypt
qt6.qtbase
qt6.qtbase.dev
qt6.qttools
qt6.qtwayland
qt6.qtwayland.dev
];
shellHook = ''
# NOTE: This is required to make it find the wayland platform plugin installed
# above, but should probably be fixed upstream.
export QT_PLUGIN_PATH="$QT_PLUGIN_PATH:${pkgs.qt6.qtwayland}/lib/qt-6/plugins"
export QT_QPA_PLATFORM="wayland;xcb"
'';
}