fix(flake): GPU hardware acceleration

* Enable hardware acceleration for Nix devenv

Section "nativeBuildInputs" needs the dependency "qt6.full" to provide hardware acceleration in QT.
Library "wayland" is needed to create a proper OpenGL context under Wayland as well.

Provide a check for open AMD driver and use it for VDPAU video hardware acceleration.

Move "wrapQtAppsHook" to it's correct place under "nativeBuildInputs".

* Add xorg.libXrandr for hardware accelerated video playback.

Using libva and openssl libraries eliminates the need for a dependency on the qt6.full library.
This commit is contained in:
Florian Zier
2024-08-30 06:49:00 +02:00
committed by GitHub
parent 750cbf0f9c
commit 4b35df0924

View File

@@ -88,10 +88,15 @@
setQtEnv = pkgs.runCommand "set-qt-env"
{
buildInputs = with qt6Pkgs.qt6; [
qtbase # Needed by wrapQtAppsHook.
wrapQtAppsHook
qtbase
];
nativeBuildInputs = with pkgs; [ makeShellWrapper ];
nativeBuildInputs = (with pkgs; [
makeShellWrapper
])
++ (with qt6Pkgs.qt6; [
wrapQtAppsHook
]);
}
''
makeShellWrapper "$(type -p sh)" "$out" "''${qtWrapperArgs[@]}"
@@ -122,7 +127,9 @@
libglvnd
libkrb5
libpulseaudio
libva
libxkbcommon
openssl
stdenv.cc.cc.lib
wayland
xorg.libxcb