Commit Graph

194 Commits

Author SHA1 Message Date
Bernardo Meurer
a158af0b1b
Merge pull request #165964 from mweinelt/firefox-hwdec 2022-03-29 09:16:18 -07:00
Martin Weinelt
6cdf69546b
firefox: allow RDD sandbox access to gpu drivers
Firefox uses a sandboxing model that only allows access to paths that
were previously explicitly granted. We can only add granular permissions
to a specific sandbox by patching, because setting LD_LIBRARY_PATH would
affect all of them.

To use hardware decoding via VA-API with Firefox 98.0.2 one needs to
head to `about:config` and enable `media.ffmpeg.vaapi.enabled`.

Closes: #157061
2022-03-29 15:44:06 +02:00
Bernardo Meurer
0e3d0d844e
Merge pull request #166078 from mweinelt/firefox-drm
firefox: fix drmSupport flag
2022-03-28 12:49:42 -07:00
Martin Weinelt
2cb9593cad firefox: always build with clang
Both LTO and PGO require the use of clang so I think its easier to just
stick with clang for all builds, so PGO and LTO could in theory be used
without each other.
2022-03-28 21:42:49 +02:00
Martin Weinelt
4cf4a7b848 firefox: add pname to throw message
https://github.com/NixOS/nixpkgs/pull/164646#discussion_r835879348
2022-03-28 21:42:49 +02:00
Martin Weinelt
0d3772f645 firefox: add profile-guided optimization
Lo and behold, we're finally catching up with Mozillas very own firefox
build in terms of speed.

PGO is an optimization technique in which in a first step we create a
build that supports instrumentation, meaning we can use it to create a
profile of how the browser behaved during usage. Then in a second pass
we create the final build that uses the acquired profiling data to
optimize the browser for the workload it actually received during
profiling.

The downside is that with PGO we now need to build Firefox twice, which
increases the build time from around 20 minutes to roughly 50 minutes.

In the Speedometer 2.0 benchmark multiple tests could see a
responsiveness improvemeant around 20-25%, which makes the increased
build time well worth it.

Sadly this benefit seems limited to x86_64-linux, builds on
aarch64-linux get stuck during profiling and I haven't found out why.

Finally, after a long time, we can say:

Closes: #76484
Supersedes: #129503
2022-03-28 21:42:49 +02:00
Martin Weinelt
2a32474802
firefox: fix drmSupport flag
In #109133 @alyssais discovered that the drmSupport flag stopped
working. This is because Mozilla decided around Firefox 51
(mozbz#1289634) to swap the default values and our flag was asking for
the wrong thing all along.

Since this flag has now been enabled for multiple years, disabling it
would mean a regression for our users. Leaving it enabled should be
unproblematic since it only controls whether Firefox shows the EME nagbar,
that allows to enable Widevine CDM, when a site requests it. The choice is
therefore completely up to the enduser.

Disabling this nagbar is still possible at runtime by setting
`browser.eme.ui.enabled` to `false`. If Widevine CDM was inadvertently
enabled it can be disabled at `media.gmp-widevinecdm.enabled`.

Supersedes: #109133
2022-03-28 18:12:02 +02:00
Martin Weinelt
b3529accfb
firefox: reformat, sort, cleanup
It is normal for such a large derivation to accumulate mixed codestyles
over all those years making it harder to maintain.

By splitting up dependencies to one per line I noticed two unused
dependencies (hunspell, sqlite) that were removed in this change.

Also most lists are now sorted alphabetically, so reasoning about them
has become much easier.

Lists now use the same style for indentation and concat, and environment
variables are all defined in preConfigure as opposed to bare in the
derivation.

The object dir, firefox build directory, is now in a predictable
directory at ${pwd}/mozobj as opposed to ${pwd}/obj-@CONFIG_GUESS@,
saving us one wildcard expansion. This is also a good prepration for the
PGO build where we need to reference bits inside this directory.

Added a few comments and clarified others from what I've learned how the
firefox build works.
2022-03-23 17:03:42 +01:00
Martin Weinelt
178d447610
firefox: pass pciutils via wrapper instead of patching it 2022-03-23 17:03:42 +01:00
Martin Weinelt
51e5f33899
firefox: fix system libffi usage
Since Firefox 51 the --enable-system-ffi flag was renamed to
--with-systemd-ffi when it moved to the javascript toolkit parts. Rename
the flag accordingly and reintroduce the dependency.

mozbz#1294803
2022-03-23 17:03:41 +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
Martin Weinelt
48eabf6838
firefox: drop hint regarding system cairo
Building with system cairo has been unsupported since Firefox 60
(mozbz#1432751) and the flag was removed in 2021 with Firefox 92
(mozbz#1722653).
2022-03-23 17:03:41 +01:00
Martin Weinelt
25e22d96ba
firefox: enable necko wifi scanner
Tied to the geolocation support flag. On Linux this uses the DBus
interface of NetworkManager to query visible accesspoints and relay them
to Mozilla location service in return for position approximation.
2022-03-23 17:03:41 +01:00
Martin Weinelt
e921e84e9d
firefox: don't set BUILD_OFFICIAL
It was removed in 2009 in favor of MOZILLA_OFFICIAL

mozbz#435923
2022-03-23 17:03:40 +01:00
Martin Weinelt
cfcc611cb4
firefox: use our own libwebp 2022-03-23 17:03:40 +01:00
Martin Weinelt
2f31fe95fd
firefox: rename patches arg to extraPatches
This is for consistency with other extra arguments that can be handed to
firefox common.nix.

Also pull the patch phase of the derivation closer together and use the
same list concat style as elsewhere.
2022-03-23 17:03:40 +01:00
Martin Weinelt
350f1345a7
firefox: unpin autoconf & icu, drop yasm
Let's not be the package that is stuck on arbitrarily old dependency
versions that should be removed anyway.
2022-03-23 17:03:40 +01:00
Martin Weinelt
3ec7f8d487
firefox: set consistent remoting name
With Firefox 98.0 the remoting name now depends on the update channel
(mozbz#1752418), which resulted in a weird app_id/wmclass of
`firefox-default`, which broke window association in GNOME and likely
other desktops.

Fixes: #165107
2022-03-23 02:13:20 +01:00
Martin Weinelt
1530477650
firefox: enable RLBox sandboxing
https://hacks.mozilla.org/2021/12/webassembly-and-back-again-fine-grained-sandboxing-in-firefox-95/

Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2022-03-14 00:17:28 +01:00
Guillaume Girol
e60782c7fa firefox: use rustPlatform.bindgenHook 2022-02-22 19:41:32 +01:00
squalus
82a7fac5af librewolf: init at 97.0-2 2022-02-12 10:31:25 -08:00
Martin Weinelt
38219f7cc7
firefox-esr-91: 91.5.1esr -> 91.6.0esr 2022-02-07 18:12:54 +01:00
Martin Weinelt
a41acde05c
firefox: 96.0.3 -> 97.0 2022-02-07 18:12:54 +01:00
Martin Weinelt
74cba0680a
firefox: 95.0.2 -> 96.0 2022-01-11 00:35:00 +01:00
Dmitry Kalinkin
2ddda43924
Merge branch 'staging' into staging-next
Conflicts:
	pkgs/os-specific/linux/kernel/common-config.nix
2021-12-25 17:16:26 -05:00
Dmitry Kalinkin
1a9297102c
Merge branch 'master' into staging-next 2021-12-23 16:58:33 -05:00
Nick Cao
038b313075
firefox: use libvpx instead of libvpx_1_8 2021-12-21 15:12:09 +08:00
github-actions[bot]
3e2d1c1e65
Merge staging-next into staging 2021-12-15 18:01:52 +00:00
Vladimír Čunát
030e814b88
Merge #148107: llvmPackages_13.clang: fix jemalloc issues
... into staging-next.  Also re-enable jemalloc in firefoxPackages.
2021-12-15 14:09:34 +01:00
Michael Weiss
8fc77f9168
Merge pull request #148588 from primeos/wayland
wayland: 1.19.0 -> 1.20.0
2021-12-11 22:04:57 +01:00
Michael Weiss
715ab2e56e
firefox: Fix the build with wayland 1.20.0
See also:
- https://git.alpinelinux.org/aports/commit/community/firefox-esr?id=a408069e75632ce625aea68c70c23ee9e30995a5
- https://bugs.gentoo.org/811840
2021-12-11 18:07:30 +01:00
ajs124
340ede9984 firefox: 94.0.2 -> 95.0 2021-12-08 11:24:19 +01:00
oxalica
cd44576bff
firefox: re-enable jemalloc 2021-12-01 15:44:47 +08:00
oxalica
8a2be27251
firefox: disable jemalloc by default to fix crash 2021-11-21 12:23:31 +08:00
oxalica
a343380d9d
firefox: enable cross-language LTO 2021-11-21 12:23:30 +08:00
oxalica
8d4bef7124
firefox: enable separated debug symbols 2021-11-21 12:23:30 +08:00
oxalica
c2409db926
firefox: remove unnecessary make flags and LD_FLAGS
Since we are using LLVM stdenv when enabling LTO, there are no need to
manually specify them.
2021-11-21 12:23:28 +08:00
oxalica
2774c726b4 firefox: add a patch fixing deadlock 2021-11-13 20:59:54 +01:00
oxalica
f857492a19 firefox: use rustc.llvmPackages.stdenv with bintools
Currently `clangUseLLVM` is broken since it uses libcxx and compiler-rt but
also specifies `--gcc-toolchain`, which leads to weird compile errors when
including C++ headers.
2021-11-13 20:59:54 +01:00
Martin Weinelt
a0201d653e
firefox: Use llvmPackages exposed by rustc 2021-11-02 17:37:18 +01:00
Martin Weinelt
d69e703b71
firefox-esr-78: drop
Firefox ESR 78.15 was the last release of this series and is now EOL.
2021-11-02 14:41:04 +01:00
Luke Granger-Brown
1b74469cd0 nixos/ca: use cacert package build for options and p11-kit output
The cacert package can now generate p11-kit-compatible output itself,
as well as generating the correct set of outputs for fully-joined
and unbundled "traditional" outputs (in standard PEM and
OpenSSL-compatible formats).
2021-10-08 01:21:57 +00:00
Martin Weinelt
7dfcaf5e73
firefox: 92.0.1 -> 93.0 2021-10-06 14:47:12 +02:00
Yureka
eeea863edd firefox: provide option to disable jemalloc
Someone noted that running Firefox with custom allocators like mimalloc
requires compiling without jemalloc.
2021-09-20 18:42:35 +02:00
Bernardo Meurer
dfccb3045e
firefox-unwrapped: workaround issues on non-Gnome wayland WM's on FF 92
Closes: #137649
2021-09-13 10:21:53 -07:00
Bernardo Meurer
8e02a42d53
Merge pull request #130116 from yu-re-ka/feature/new-thunderbird
thunderbird: 78.13.0 -> 91.0 and use firefox expression
2021-08-12 23:02:21 +00: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
Sean Buckley
9290873838 firefox: fix enableOfficialBranding 2021-08-11 20:14:23 -04:00
Martin Weinelt
810b03602b firefox: 90.0.2 -> 91.0 2021-08-10 07:43:50 +09:00