From 06d8666a60174dd3083d1516f9f405251601f476 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Tue, 25 Jun 2019 22:17:21 +0200 Subject: [PATCH] firefox: allow overriding config of wrapped package By moving the `cfg` variable into the wrapper arguments we are able to override it for an already wrapped package. For example, with this change one can have pkgs.firefox-devedition-bin.override { cfg.enableBrowserpass = true; } which would otherwise be difficult to accomplish for packages having a complicated wrapped definition in `all-packages.nix`. --- pkgs/applications/networking/browsers/firefox/wrapper.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index d99c2a40b081..bc1678335947 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -28,12 +28,12 @@ let , extraPlugins ? [] , extraNativeMessagingHosts ? [] , gdkWayland ? false + , cfg ? config.${browserName} or {} }: assert gdkWayland -> (browser ? gtk3); # Can only use the wayland backend if gtk3 is being used let - cfg = config.${browserName} or {}; enableAdobeFlash = cfg.enableAdobeFlash or false; ffmpegSupport = browser.ffmpegSupport or false; gssSupport = browser.gssSupport or false;