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`.
This commit is contained in:
@@ -28,12 +28,12 @@ let
|
|||||||
, extraPlugins ? []
|
, extraPlugins ? []
|
||||||
, extraNativeMessagingHosts ? []
|
, extraNativeMessagingHosts ? []
|
||||||
, gdkWayland ? false
|
, gdkWayland ? false
|
||||||
|
, cfg ? config.${browserName} or {}
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert gdkWayland -> (browser ? gtk3); # Can only use the wayland backend if gtk3 is being used
|
assert gdkWayland -> (browser ? gtk3); # Can only use the wayland backend if gtk3 is being used
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.${browserName} or {};
|
|
||||||
enableAdobeFlash = cfg.enableAdobeFlash or false;
|
enableAdobeFlash = cfg.enableAdobeFlash or false;
|
||||||
ffmpegSupport = browser.ffmpegSupport or false;
|
ffmpegSupport = browser.ffmpegSupport or false;
|
||||||
gssSupport = browser.gssSupport or false;
|
gssSupport = browser.gssSupport or false;
|
||||||
|
|||||||
Reference in New Issue
Block a user