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
launchpad/nixpkgs/master
Michal Sojka 3 years ago
parent c5bff358e9
commit 5102a12471
  1. 3
      pkgs/applications/networking/browsers/firefox/wrapper.nix

@ -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

Loading…
Cancel
Save