Merge pull request #31572 from deedrah/pr/firefox-native-messaging-hosts
firefox: support for native messaging hosts in wrapper
This commit is contained in:
commit
ea1724ba37
@ -0,0 +1,14 @@
|
||||
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
|
||||
index 380c1c1..255539f 100644
|
||||
--- a/toolkit/xre/nsXREDirProvider.cpp
|
||||
+++ b/toolkit/xre/nsXREDirProvider.cpp
|
||||
@@ -306,7 +306,8 @@ GetSystemParentDirectory(nsIFile** aFile)
|
||||
"/usr/lib/mozilla"
|
||||
#endif
|
||||
);
|
||||
- rv = NS_NewNativeLocalFile(dirname, false, getter_AddRefs(localDir));
|
||||
+ const char* pathVar = PR_GetEnv("MOZ_SYSTEM_DIR");
|
||||
+ rv = NS_NewNativeLocalFile((pathVar && *pathVar) ? nsDependentCString(pathVar) : reinterpret_cast<const nsCString&>(dirname), false, getter_AddRefs(localDir));
|
||||
#endif
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
@ -13,7 +13,7 @@ rec {
|
||||
};
|
||||
|
||||
patches =
|
||||
[ ./no-buildconfig.patch ]
|
||||
[ ./no-buildconfig.patch ./env_var_for_system_dir.patch ]
|
||||
++ lib.optional stdenv.isi686 (fetchpatch {
|
||||
url = "https://hg.mozilla.org/mozilla-central/raw-rev/15517c5a5d37";
|
||||
sha256 = "1ba487p3hk4w2w7qqfxgv1y57vp86b8g3xhav2j20qd3j3phbbn7";
|
||||
@ -38,6 +38,9 @@ rec {
|
||||
sha512 = "fe724108ba538e590b87a5c1b817471d3cca9b038ba2755642e4d7b8ebb6174322be1fe074f24ef181946f9a027106b50b500d2fa541d8a99ef44905822eda18";
|
||||
};
|
||||
|
||||
patches =
|
||||
[ ./env_var_for_system_dir.patch ];
|
||||
|
||||
meta = firefox.meta // {
|
||||
description = "A web browser built from Firefox Extended Support Release source tree";
|
||||
};
|
||||
@ -128,6 +131,9 @@ in rec {
|
||||
rev = "tor-browser-52.3.0esr-7.0-1-slnos";
|
||||
sha256 = "0szbf8gjbl4dnrb4igy4mq5858i1y6ki4skhdw63iqqdd8w9v4yv";
|
||||
};
|
||||
|
||||
patches =
|
||||
[ ./env_var_for_system_dir.patch ];
|
||||
} // commonAttrs) {};
|
||||
|
||||
tor-browser = tor-browser-7-0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, makeDesktopItem, makeWrapper, config
|
||||
{ stdenv, lib, makeDesktopItem, makeWrapper, lndir, config
|
||||
|
||||
## various stuff that can be plugged in
|
||||
, flashplayer, hal-flash
|
||||
@ -47,6 +47,9 @@ let
|
||||
++ lib.optional (cfg.enableEsteid or false) esteidfirefoxplugin
|
||||
++ lib.optional (cfg.enableVLC or false) vlc_npapi
|
||||
);
|
||||
nativeMessagingHosts =
|
||||
([ ]
|
||||
);
|
||||
libs = (if ffmpegSupport then [ ffmpeg ] else with gst_all; [ gstreamer gst-plugins-base ])
|
||||
++ lib.optional gssSupport kerberos
|
||||
++ lib.optionals (cfg.enableQuakeLive or false)
|
||||
@ -98,6 +101,7 @@ in stdenv.mkDerivation {
|
||||
--prefix-contents PATH ':' "$(filterExisting $(addSuffix /extra-bin-path $plugins))" \
|
||||
--suffix PATH ':' "$out/bin" \
|
||||
--set MOZ_APP_LAUNCHER "${browserName}${nameSuffix}" \
|
||||
--set MOZ_SYSTEM_DIR "$out/lib/mozilla" \
|
||||
${lib.optionalString (!ffmpegSupport)
|
||||
''--prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"''
|
||||
+ lib.optionalString (browser ? gtk3)
|
||||
@ -117,6 +121,11 @@ in stdenv.mkDerivation {
|
||||
|
||||
install -D -t $out/share/applications $desktopItem/share/applications/*
|
||||
|
||||
mkdir -p $out/lib/mozilla
|
||||
for ext in ${toString nativeMessagingHosts}; do
|
||||
${lndir}/bin/lndir -silent $ext/lib/mozilla $out/lib/mozilla
|
||||
done
|
||||
|
||||
# For manpages, in case the program supplies them
|
||||
mkdir -p $out/nix-support
|
||||
echo ${browser} > $out/nix-support/propagated-user-env-packages
|
||||
|
Loading…
Reference in New Issue
Block a user