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 | |
| 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.
| -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 @@ | |||
| 415 | "Full-featured browser client built from Firefox source tree, without | 415 | "Full-featured browser client built from Firefox source tree, without |
| 416 | the official icon and the name \"firefox\".") | 416 | the official icon and the name \"firefox\".") |
| 417 | (license license:mpl2.0))) | 417 | (license license:mpl2.0))) |
| 418 | |||
| 419 | (define-public firefox/wayland | ||
| 420 | (package/inherit firefox | ||
| 421 | (name "firefox-wayland") | ||
| 422 | (arguments | ||
| 423 | (substitute-keyword-arguments (package-arguments firefox) | ||
| 424 | ((#:configure-flags flags) | ||
| 425 | `(append (list "--enable-default-toolkit=cairo-gtk3-wayland") | ||
| 426 | (delete "--enable-default-toolkit=cairo-gtk3" ,flags))) | ||
| 427 | ;; We need to set the MOZ_ENABLE_WAYLAND env variable. | ||
| 428 | ((#:phases phases) | ||
| 429 | `(modify-phases ,phases | ||
| 430 | (replace 'wrap-program | ||
| 431 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 432 | (let* ((out (assoc-ref outputs "out")) | ||
| 433 | (lib (string-append out "/lib")) | ||
| 434 | (ld-libs (map (lambda (x) | ||
| 435 | (string-append (assoc-ref inputs x) | ||
| 436 | "/lib")) | ||
| 437 | '("pulseaudio" "mesa"))) | ||
| 438 | (gtk-share (string-append (assoc-ref inputs "gtk+") | ||
| 439 | "/share"))) | ||
| 440 | (wrap-program (car (find-files lib "^firefox$")) | ||
| 441 | `("LD_LIBRARY_PATH" prefix ,ld-libs) | ||
| 442 | `("XDG_DATA_DIRS" prefix (,gtk-share)) | ||
| 443 | `("MOZ_ENABLE_WAYLAND" = ("1")) | ||
| 444 | `("MOZ_LEGACY_PROFILES" = ("1")) | ||
| 445 | `("MOZ_ALLOW_DOWNGRADE" = ("1"))) | ||
| 446 | #t))))))))) | ||
