Commit Graph

170 Commits

Author SHA1 Message Date
Austin Butler
645253e62f firefox: fix desktop file and icon for variants 2023-02-27 11:54:16 -08:00
Felix Buehler
bc3d5934d7 treewide: use lib.optionals 2023-02-14 19:11:59 +01:00
Bruno Inec
38072997c5
firefox: option to enable speech synthesis 2023-01-24 16:23:23 +01:00
Martin Weinelt
c156bdf40d
firefox, thunderbird, librewolf: Enable wayland support by default
Enabling Wayland support by default prevents use of XWayland on Wayland
systems, while correctly falling back to X11 when Wayland is
unavailable in the current session.

With the current packaging many people unnecessarily rely on the
`firefox` attribute, which is suggested by nixos-generate-config, which
in turn makes their Firefox use XWayland, when it shouldn't, which
causes bugs with GNOME on Wayland:

https://discourse.nixos.org/t/firefox-all-black-when-first-launched-after-login/21143

Using the Wayland-enabled Firefox was tested on pure X11 systems by
contributors on the #nix-mozilla:nixos.org room and we are confident
this change will not cause severe regressions.

Even better, people can now toggle `MOZ_ENABLE_WAYLAND=<0|1>` in their
environment to override this decision, should they feel the need to do
so.
2022-11-17 11:50:12 +01:00
Vladimír Čunát
7a146b3bab firefox*, thunderbird*: fix the Profile Manager .desktop action 2022-11-12 12:06:09 +01:00
taku0
aaa9a95e02 thunderbird, thunderbird-bin: fix desktop item
Generate appropriate desktop item for Thunderbird.

Fixes #194851.
2022-11-03 17:24:37 +09:00
Jan Tojnar
50c6895e77 gnome-browser-connector: 10.1 → 42.0
https://discourse.gnome.org/t/split-and-rename-of-chrome-gnome-shell/11075
815ec9e1af...v42.0

- Renamed and split into a separate repo from the extensions.
- CMake build replaced with Meson (jq also not needed)
- requests Python module not needed since updates are now solely handled by GNOME Shell itself

Also

- Corrected license
- Cleaned up the module
- Replaced PYTHONPATH in a wrapper by Python environment

Changelog-Reviewed-By: Jan Tojnar <jtojnar@gmail.com>
2022-10-11 18:52:12 +02:00
Ryan Hendrickson
c5b04c9144 firefox: address automated review comments 2022-10-01 12:58:22 -04:00
linsui
09800d7f75 firefox wrapper: write extraPrefsFiles before extraPrefs 2022-09-07 21:36:04 +08:00
Atemu
e661714656 firefox: use ffmpeg_5
Allows for AV1 VAAPI decoding
2022-09-02 00:12:41 +02:00
Emery Hemingway
b5526585c2 treewide: inject xdg-open into wrappers as $PATH suffix
The xdg-open utility is only ever a runtime dependency and its
dependents only expect that it accept a URI as a command line
argument and do something with it that the user would expect.
For such as a trivial relationship it should be possible for
users to override xdg-open with something else in their PATH.
2022-08-19 13:11:27 -05:00
Ryan Hendrickson
3b1f5eab31 firefox: add application actions to .desktop file 2022-08-15 12:47:27 -04:00
aszlig
9744ff74ad
firefox: Improve detecting signing requirements
Firefox 61 started to enforce signatures for add-ons and since
commit d031843a1e, we get an evaluation
error that recommends the user to switch to Firefox ESR.

This isn't an option for everyone and as I also pointed out in the pull
request[1] introducing the above commit, I've been building Firefox like
this:

  let
    firefoxNoSigning = firefox-unwrapped.overrideAttrs (lib.const {
      MOZ_REQUIRE_SIGNING = false;
    });
  in wrapFirefox firefoxNoSigning {
    nixExtensions = ...;
  }

However, this only works after manually modifying nixpkgs (or copy &
paste wrapper.nix elsewhere) every time I want to have a new Firefox
version. Of course, this gets annoying and tedious after a while, so
this motivated me to properly fix this to not only check for an ESR
version but also check the value of MOZ_REQUIRE_SIGNING.

Note that I'm using toString here to check for the value because there
are several ways (false, null, "", ...) to set the environment variable
to an empty string and toString makes sure that it really is the desired
behaviour. I specifically checked the Firefox source and also tested
this with multiple values and only building with MOZ_REQUIRE_SIGNING
set to an empty string seems to work (no "0", "false" or other
variants).

Additionally, there is another method to allow unsigned add-ons, which
is by using the --with-unsigned-addon-scopes configure option[2].
Unfortunately, this does not work with nixExtensions because we don't
have (or want) a central directory where those add-ons reside.

Given that nixExtensions disallows manually installing add-ons, setting
MOZ_REQUIRE_SIGNING to false should be safe in this case.

[1]: https://github.com/NixOS/nixpkgs/pull/133504
[2]: https://bugs.archlinux.org/task/63075

Signed-off-by: aszlig <aszlig@nix.build>
2022-06-21 11:54:08 +02:00
Klemens Nanni
5d27c8d53f firefox: merge identical optionalAttrs block, fix indent
Two consecutive sets are pulled in under the same `usesNixExtensions`
condition.

Due to wrong indentation, it does however they are nested.

Fix both.
2022-06-01 02:14:37 +02:00
Klemens Nanni
34364c9f5f firefox: smartcardSupport: Use multi-slot module
`onepin-opensc-pkcs11.so` only enables PIN1, but PIN2 is also required.
`opensc-pkcs11.so` enables all slots.

I can successfully use PIN1 and PIN2 in Smart-ID cards with this.
2022-06-01 01:22:45 +02:00
github-actions[bot]
d79af4efe4
Merge staging-next into staging 2022-05-13 00:03:35 +00:00
Naïm Favier
88369997e1
makeBinaryWrapper: add extractCmd
A small shell script that can be used to extract a binary wrapper's
makeCWrapper call from its embedded docstring, without depending on
makeBinaryWrapper.
2022-05-12 01:44:02 +02:00
Naïm Favier
2ae69114a1
makeWrapper: implement --inherit-argv0
For symmetry/interoperability with makeBinaryWrapper. Implemented as
--argv0 '$0'
2022-05-10 22:07:57 +02:00
Naïm Favier
b0f5004a06
wrapFirefox: move back into $out 2022-05-10 13:19:54 +02:00
Martin Weinelt
e33498fb74
Merge pull request #172002 from S-NA/support-more-audio-backends 2022-05-10 02:15:54 +02:00
S. Nordin Abouzahra
0bafb3baa7 firefox: support JACK and sndio audio backends
You can set `media.cubeb.backend` in `about:config` to force a specific
backend.
2022-05-07 18:36:06 -04:00
Naïm Favier
863cdf8f09
wrapFirefox: handle binary wrappers
We can't just edit binary wrappers in place because of a length
mismatch, so we have to parse the generating makeCWrapper call out of
the binary, extract wrapper arguments from it and add them to the
Firefox wrapper.

All these contortions are needed because Firefox looks for its runtime
in argv0, so the proper argv0 needs to be set by wrappers to always
point to the "final" runtime. I think this could be avoided by wrapping
/lib/$libName/firefox instead of /bin/firefox, and I'd like to look into
that in the future, but for now I'm just fixing the immediate problem.
2022-05-07 20:40:43 +02:00
Martin Weinelt
178d447610
firefox: pass pciutils via wrapper instead of patching it 2022-03-23 17:03:42 +01:00
Martin Weinelt
08ea534e67
firefox: drop darwin support
Darwin support was marked broken in 2019 with Firefox 69 and has missed
therefore missed out and not been tested on the following 29 major
releases since.

It cannot be supported again without a darwin user stepping up to take
care and work on and test every major release, which hasn't happened
since I took over maintainership.

The recommendation of the people that tend to the firefox source build
is for darwin users to use firefox-bin instead.
2022-03-23 17:03:41 +01:00
Martin Weinelt
71d879b16b
firefox: drop pipewire from build inputs
Firefox does not support passing pipewire as a system library and
instead relies on a vendored copy it ships. We keep the flag because it
is tied into the wrapper, because we still need to have access to its
libraries at runtime.
2022-03-23 17:03:41 +01:00
arcnmx
8fcde13ce7 firefox-bin: disable automatic updates 2022-03-06 07:54:10 -08:00
K900
8bb8f9c811 firefox/wrapper: allow specifying StartupWMClass
Primarily useful for out of tree beta/nightly builds, which use a different WM_CLASS
2022-02-25 13:40:38 -08:00
K900
cb2cfba6f7 treewide: switch all desktop file generators to new API
Notably:
- remove explicit arguments that match the defaults
- convert everything to the right Nix types
2022-02-25 13:40:38 -08:00
Bernardo Meurer
0d1dde0e78
Merge pull request #121596 from arcnmx/firefox-wrapper
firefox-bin: provide wrapper with firefoxLibName
2022-02-16 20:26:15 -08:00
ajs124
19be17d54f wrapFirefox: remove old npapi plugin related options 2022-02-16 21:17:30 +01:00
arcnmx
9ead68aa4b firefox-bin: provide wrapper with libName
The wrapper was configuring the wrong directory, and
`${libName}/firefox-bin` must not be a symlink.
2022-02-13 09:29:38 -08:00
squalus
82a7fac5af librewolf: init at 97.0-2 2022-02-12 10:31:25 -08:00
Nick Cao
f2f972dc20
firefox-wrapper: add replace to nativeBuildInputs instead of string interpolation 2022-01-01 12:07:45 +08:00
taku0
881d3fae72 wrapFirefox: fix icon linking for Thunderbird
Firefox has its icons in
`/lib/firefox-bin-*/browser/chrome/icons/default` while Thunderbird has
`/lib/thunderbird/chrome/icons/default`.

Fixes https://github.com/NixOS/nixpkgs/pull/143942#issuecomment-963418080.
2021-11-14 13:54:00 +09:00
Luis-Hebendanz
d031843a1e firefox: Added checks for new addon behaviour since v91 2021-08-22 22:17:44 +02:00
Yureka
711d674e13 firefox: rename some attributes in packaging
This should not change the derivation, but the new attribute names make
more sense once we package something that is not Firefox using this
expression.
2021-08-12 08:50:41 +02:00
Gardanta Spirito
33bf438fa2 firefox: add smartcard support through opensc 2021-08-07 01:31:07 +03:00
ajs124
c6e51d0369 firefox-wrapper: also make gtk3-support non-optional here 2021-07-12 16:47:34 +02:00
Bernardo Meurer
3694ff7027
Merge pull request #126404 from wentasah/firefox-cups
firefox: Make CUPS printers visible in the print dialog
2021-06-10 17:43:35 +00:00
AndersonTorres
e9e5f5f84d Change all alsaLib references to alsa-lib 2021-06-10 01:12:49 -03:00
Michal Sojka
5102a12471 firefox: Make CUPS printers visible in the print dialog
Firefox 81 introduced a new print dialog. Under NixOS, this dialog
offers only "Save as PDF" as the destination. To print to a real
printer, one has to click "Print using the system dialog" and print
from there. This is not only one unnecessary extra click, but the
system dialog also does not offer preview.

With this commit, Firefox starts offering real printers in its
printing dialog, removing the above mentioned deficiencies.

CUPS is needed because Firefox uses dlopen() to load libcups.so.2 at
runtime. See
https://searchfox.org/mozilla-central/rev/b52cf6bbe214bd9d93ed9333d0403f7d556ad7c8/widget/nsCUPSShim.cpp#28
2021-06-09 23:09:48 +02:00
Nicolas B. Pierron
efef092ba5 firefox-bin: Avoid including both the wrapped and unwrapped version when using nix run command.
In order to make the man pages accessible, the previous code used
nix-support/propagated-user-env-packages. However this file is also used to set
the PATH when the application is executed with `nix run`, thus including the
wrapped and the wrappee in the environment.

Having the wrappee enumerated first in the environment caused `firefox` to
default to the wrappee, and as such not being able to find a proper GTK. This
was a source of failures while opening a file-picker.

This change removes the code to propagate the wrappe in the environment, as the
man pages are already linked in the wrapper output.
2021-06-07 11:42:18 +02:00
Jan Tojnar
468cb5980b gnome: rename from gnome3
Since GNOME version is now 40, it no longer makes sense to use the old attribute name.
2021-05-08 09:47:42 +02:00
Martin Weinelt
e75f053238
Merge pull request #119434 from ooesili/firefox-ld-path-prefix
Add Firefox libs to beginning of LD_LIBRARY_PATH
2021-04-22 20:25:45 +02:00
Sebastian Graf
fa7004fd29 firefox: Remove SNAP_NAME=firefox in wrapper
082ed38 introduced it to fix the profile-per-install policy of FF 67. But since
FF 69 (or 68?), there is `MOZ_LEGACY_PROFILES`, which we use since 87e2618.
There is no reason for the `SNAP_NAME=firefox` workaround anymore.

Additionally, the combination of `SNAP_NAME=firefox` with
a large ~/.nix-profile/share in `XDG_DATA_DIRS` triggered
https://bugzilla.mozilla.org/show_bug.cgi?id=1569625 for me, so this really
fixes a bug in my configuration.

The only downside of this approach is that we lose support for running FF 67
(and possibly 68).
2021-04-19 14:33:19 +02:00
Wesley Merkel
2fc271ffdd Add Firefox libs to beginning of LD_LIBRARY_PATH
When firefox is executed by programs that also make changes to
`LD_LIBRARY_PATH`, the paths can conflict causing firefox to look for
shared libraries in the wrong location. This is because the wrapper
script around firefox *appends* library paths to `LD_LIBRARY_PATH`
instead of prepending them, causing library paths that are already in
the environment to take precedence over the library paths that firefox
depends on.

As an example, Discord and firefox both depend on different versions of
libnss. When Discord launches firefox, which happens when clicking on
hyperlinks, the path in `LD_LIBRARY_PATH` to libnss set by Discord takes
precedence over then one set by the firefox wrapper script causing
firefox to load a different version of libnss than the one it was built
against. This causes a fatal error in firefox which prevents it from
starting.

This commit fixes this issue by switching the firefox wrapper script to
*prepend* its library paths to `LD_LIBRARY_PATH`.

Fixes #118432
2021-04-14 10:52:28 -05:00
Luis Hebendanz
94d7d46e20 firefox/wrapper.nix: Fixed firefox is always 'managed by your organization' 2021-04-10 01:46:18 +02:00
Sandro Jäckel
dcb501f993
kerberos: deprecate alias 2021-04-04 03:18:56 +02:00
Dominik Xaver Hörl
ac2e3ef270 firefox/wrapper: clean up plugin related code 2021-02-09 19:52:54 +01:00
Bernardo Meurer
76dc1086dc
firefox: remove flash support 2021-02-08 09:38:40 -08:00