diff options
author | John Kehayias <john.kehayias@protonmail.com> | 2025-04-07 15:16:38 -0400 |
---|---|---|
committer | John Kehayias <john.kehayias@protonmail.com> | 2025-04-07 15:28:07 -0400 |
commit | 8324e3c01e5377be75f5260374d194fa0935c0f4 (patch) | |
tree | 614bffb87ff1513f5076fc04776c95ba22f8b8e1 /nongnu | |
parent | 54625807ac0e9845b890bfa2f71b2f7cbb6dc261 (diff) |
nongnu: firefox: Fix video decoding/acceleration.
Fixes #386.
As of Firefox 137, VA-API video acceleration is enabled by default. This
would fail due to not finding libpciaccess. This is an indirect dependency,
through libdrm (that mesa and libva depend on). It would be best to have our
runpaths-of-input work recursively to catch this (so it can be in the RDD
sandbox used by Firefox here). In the meantime, add libpciaccess explicitly
to fix this issue.
* nongnu/packages/mozilla.scm (firefox-esr)[arguments]<#:phases>: In the
wrap-program phase, add the libpciaccess library path, used in
LD_LIBRARY_PATH. Add a comment for future work on rdd-whitelist.
[inputs]: Add libpciaccess.
Diffstat (limited to 'nongnu')
-rw-r--r-- | nongnu/packages/mozilla.scm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/nongnu/packages/mozilla.scm b/nongnu/packages/mozilla.scm index 7de17b8..8476a8b 100644 --- a/nongnu/packages/mozilla.scm +++ b/nongnu/packages/mozilla.scm @@ -372,6 +372,10 @@ ;; For hardware video acceleration via VA-API (libva-lib (string-append (assoc-ref inputs "libva") "/lib")) + ;; Needed for video acceleration (via libdrm which mesa + ;; and libva depend on). + (pciaccess-lib (string-append (assoc-ref inputs "libpciaccess") + "/lib")) ;; VA-API is run in the RDD (Remote Data Decoder) sandbox ;; and must be explicitly given access to files it needs. ;; Rather than adding the whole store (as Nix had @@ -381,6 +385,9 @@ ;; runpaths of the needed libraries to add everything to ;; LD_LIBRARY_PATH. These will then be accessible in the ;; RDD sandbox. + ;; TODO: Properly handle the runpath of libraries needed + ;; (for RDD) recursively, so the explicit libpciaccess + ;; can be removed. (rdd-whitelist (map (cut string-append <> "/") (delete-duplicates @@ -397,8 +404,8 @@ "/share"))) (wrap-program (car (find-files lib "^firefox$")) `("LD_LIBRARY_PATH" prefix (,mesa-lib ,libnotify-lib ,libva-lib - ,pulseaudio-lib ,eudev-lib ,@rdd-whitelist - ,pipewire-lib)) + ,pciaccess-lib ,pulseaudio-lib ,eudev-lib + ,@rdd-whitelist ,pipewire-lib)) `("XDG_DATA_DIRS" prefix (,gtk-share)) `("MOZ_LEGACY_PROFILES" = ("1")) `("MOZ_ALLOW_DOWNGRADE" = ("1")))))) @@ -455,6 +462,7 @@ libgnome libjpeg-turbo libnotify + libpciaccess ;; libpng-apng libva libvpx |