firefox: support for native messaging hosts in wrapper#31572
firefox: support for native messaging hosts in wrapper#315727c6f434c merged 1 commit intoNixOS:masterfrom
Conversation
|
Thanks for working on this, this will help packages like browserpass (which has a NixOS module) and friends.
|
|
My bad, I read the patch. I wonder if this is something that can be achieved using a FHS user env wrapper in order to avoid recompiling? |
|
@eqyiel not sure if a rebuild is worse than requiring user namespaces on non-NixOS Linux in this case Given that Firefox 57 (with Big Changes™) is expected this week, if we check the patch with the new version first, most users won't even get an extra rebuild. |
|
@7c6f434c that's true, I didn't even consider that. In any case I will be happy to be able to use native messaging hosts in NixOS! |
|
@taku0 any opinion (as recently you are the person who usually updates Firefox)? Also, any opinion about trying to combine this with FF57 update? |
|
Here is a WIP FF57 branch (without this PR): https://github.com/taku0/nixpkgs/tree/firefox-bin-57.0 |
|
@taku0 I think rebuilding is fine if the two rebuilds are close; do as is more convenient. I just meant that all the events would be relatively close to each other. |
|
Wait a minute, the release source tarball is already available? |
|
Hmm, maybe I have found another way. Most of the code of native messaging is written in JavaScript and theoretically it should be possible to change it in the wrapper. I known where and what to change but I have problems with repacking |
|
I succeeded to build Firefox 57 with this patch without errors. I made PR for Firefox 57, without this patch. |
|
Double merge and a hope for the best. |
|
Nice. I will prepare cleaner version of the patch for firefox. Instead of overriding system dir, it will extend search path for native mess. hosts as |
Motivation for this change
New web extensions sometimes need native binaries installed to work. However in firefox the search path for these binaries is hardcoded to
/usr/lib/mozilla/native-messaging-hosts.I added small patch that allows overriding that path by new env varibale MOZ_SYSTEM_DIR and enhanced the wrapper. Here is an example integration of chrome-gnome-shell.
This will allows to add existing native messaging hosts (#28882 and #24803) to firefox in similar way like plugins .
Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)