diff options
author | Jonathan Brielmaier <jonathan.brielmaier@web.de> | 2020-11-01 19:21:00 +0100 |
---|---|---|
committer | Jonathan Brielmaier <jonathan.brielmaier@web.de> | 2020-11-02 17:14:39 +0100 |
commit | 5cc66880dddd3e8e7fee38152712ef44e326e9b5 (patch) | |
tree | 3ea630e5680517ada5a581ab3839be0d0b5b7dd6 /nongnu/packages | |
parent | 8581fb999d3ae4ddecac0a8c064710b9fa02f43d (diff) |
nongnu: Add firefox-wayland.
This gives us firefox with Wayland support. Especially usefull on HiDPI
environments.
* nongnu/packages/mozilla.scm (firefox/wayland): New variable.
Diffstat (limited to 'nongnu/packages')
-rw-r--r-- | nongnu/packages/mozilla.scm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nongnu/packages/mozilla.scm b/nongnu/packages/mozilla.scm index bd93b05..7c7971f 100644 --- a/nongnu/packages/mozilla.scm +++ b/nongnu/packages/mozilla.scm @@ -415,3 +415,32 @@ "Full-featured browser client built from Firefox source tree, without the official icon and the name \"firefox\".") (license license:mpl2.0))) + +(define-public firefox/wayland + (package/inherit firefox + (name "firefox-wayland") + (arguments + (substitute-keyword-arguments (package-arguments firefox) + ((#:configure-flags flags) + `(append (list "--enable-default-toolkit=cairo-gtk3-wayland") + (delete "--enable-default-toolkit=cairo-gtk3" ,flags))) + ;; We need to set the MOZ_ENABLE_WAYLAND env variable. + ((#:phases phases) + `(modify-phases ,phases + (replace 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (ld-libs (map (lambda (x) + (string-append (assoc-ref inputs x) + "/lib")) + '("pulseaudio" "mesa"))) + (gtk-share (string-append (assoc-ref inputs "gtk+") + "/share"))) + (wrap-program (car (find-files lib "^firefox$")) + `("LD_LIBRARY_PATH" prefix ,ld-libs) + `("XDG_DATA_DIRS" prefix (,gtk-share)) + `("MOZ_ENABLE_WAYLAND" = ("1")) + `("MOZ_LEGACY_PROFILES" = ("1")) + `("MOZ_ALLOW_DOWNGRADE" = ("1"))) + #t))))))))) |