From 5102a1247103e7f23fdad9710f1887807b31e37f Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Wed, 9 Jun 2021 17:09:59 +0200 Subject: [PATCH] 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 --- pkgs/applications/networking/browsers/firefox/wrapper.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 13becfc4f629..f338a41be716 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/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