firefox: Make CUPS printers visible in the print dialog

Firefox 81 introduced a new print dialog. Under NixOS, this dialog
offers only "Save as PDF" as the destination. To print to a real
printer, one has to click "Print using the system dialog" and print
from there. This is not only one unnecessary extra click, but the
system dialog also does not offer preview.

With this commit, Firefox starts offering real printers in its
printing dialog, removing the above mentioned deficiencies.

CUPS is needed because Firefox uses dlopen() to load libcups.so.2 at
runtime. See
https://searchfox.org/mozilla-central/rev/b52cf6bbe214bd9d93ed9333d0403f7d556ad7c8/widget/nsCUPSShim.cpp#28
This commit is contained in:
Michal Sojka 2021-06-09 17:09:59 +02:00
parent c5bff358e9
commit 5102a12471

View file

@ -11,6 +11,7 @@
, libkrb5
, libva
, mesa # firefox wants gbm for drm+dmabuf
, cups
}:
## configurability of the wrapper itself
@ -62,7 +63,7 @@ let
++ lib.optional (cfg.enableFXCastBridge or false) fx_cast_bridge
++ extraNativeMessagingHosts
);
libs = lib.optionals stdenv.isLinux [ udev libva mesa libnotify xorg.libXScrnSaver ]
libs = lib.optionals stdenv.isLinux [ udev libva mesa libnotify xorg.libXScrnSaver cups ]
++ lib.optional (pipewireSupport && lib.versionAtLeast version "83") pipewire
++ lib.optional ffmpegSupport ffmpeg
++ lib.optional gssSupport libkrb5