mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-08 06:28:50 +03:00
Merge pull request #31743 from ttuegel/firefox/wrapper
wrapFirefox: make overridable, support browserpass
This commit is contained in:
commit
33a736cafa
@ -8,21 +8,28 @@
|
||||
, google_talk_plugin, fribid, gnome3/*.gnome_shell*/
|
||||
, esteidfirefoxplugin
|
||||
, vlc_npapi
|
||||
, browserpass
|
||||
, libudev
|
||||
, kerberos
|
||||
}:
|
||||
|
||||
## configurability of the wrapper itself
|
||||
|
||||
browser:
|
||||
{ browserName ? browser.browserName or (builtins.parseDrvName browser.name).name
|
||||
, name ? (browserName + "-" + (builtins.parseDrvName browser.name).version)
|
||||
, desktopName ? # browserName with first letter capitalized
|
||||
(lib.toUpper (lib.substring 0 1 browserName) + lib.substring 1 (-1) browserName)
|
||||
, nameSuffix ? ""
|
||||
, icon ? browserName
|
||||
}:
|
||||
|
||||
let
|
||||
wrapper =
|
||||
{ browserName ? browser.browserName or (builtins.parseDrvName browser.name).name
|
||||
, name ? (browserName + "-" + (builtins.parseDrvName browser.name).version)
|
||||
, desktopName ? # browserName with first letter capitalized
|
||||
(lib.toUpper (lib.substring 0 1 browserName) + lib.substring 1 (-1) browserName)
|
||||
, nameSuffix ? ""
|
||||
, icon ? browserName
|
||||
, extraPlugins ? []
|
||||
, extraNativeMessagingHosts ? []
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = stdenv.lib.attrByPath [ browserName ] {} config;
|
||||
enableAdobeFlash = cfg.enableAdobeFlash or false;
|
||||
ffmpegSupport = browser.ffmpegSupport or false;
|
||||
@ -46,9 +53,12 @@ let
|
||||
++ lib.optional (cfg.enableAdobeReader or false) adobe-reader
|
||||
++ lib.optional (cfg.enableEsteid or false) esteidfirefoxplugin
|
||||
++ lib.optional (cfg.enableVLC or false) vlc_npapi
|
||||
++ extraPlugins
|
||||
);
|
||||
nativeMessagingHosts =
|
||||
([ ]
|
||||
++ lib.optional (cfg.enableBrowserpass or false) browserpass
|
||||
++ extraNativeMessagingHosts
|
||||
);
|
||||
libs = (if ffmpegSupport then [ ffmpeg ] else with gst_all; [ gstreamer gst-plugins-base ])
|
||||
++ lib.optional gssSupport kerberos
|
||||
@ -59,7 +69,7 @@ let
|
||||
gst-plugins = with gst_all; [ gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-ffmpeg ];
|
||||
gtk_modules = [ libcanberra_gtk2 ];
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
in stdenv.mkDerivation {
|
||||
inherit name;
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
@ -152,4 +162,6 @@ in stdenv.mkDerivation {
|
||||
hydraPlatforms = [];
|
||||
priority = (browser.meta.priority or 0) - 1; # prefer wrapper over the package
|
||||
};
|
||||
}
|
||||
};
|
||||
in
|
||||
lib.makeOverridable wrapper
|
||||
|
Loading…
Reference in New Issue
Block a user