Skip to content

Commit 4b35df0

Browse files
authored
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.
1 parent 750cbf0 commit 4b35df0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

flake.nix

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,15 @@
8888
setQtEnv = pkgs.runCommand "set-qt-env"
8989
{
9090
buildInputs = with qt6Pkgs.qt6; [
91-
qtbase # Needed by wrapQtAppsHook.
92-
wrapQtAppsHook
91+
qtbase
9392
];
94-
nativeBuildInputs = with pkgs; [ makeShellWrapper ];
93+
94+
nativeBuildInputs = (with pkgs; [
95+
makeShellWrapper
96+
])
97+
++ (with qt6Pkgs.qt6; [
98+
wrapQtAppsHook
99+
]);
95100
}
96101
''
97102
makeShellWrapper "$(type -p sh)" "$out" "''${qtWrapperArgs[@]}"
@@ -122,7 +127,9 @@
122127
libglvnd
123128
libkrb5
124129
libpulseaudio
130+
libva
125131
libxkbcommon
132+
openssl
126133
stdenv.cc.cc.lib
127134
wayland
128135
xorg.libxcb

0 commit comments

Comments
 (0)